PHP 4.0 Bug #9441: New feature for foreach control structure

From: Date: Sun, 25 Feb 2001 14:02:14 +0000
Subject: PHP 4.0 Bug #9441: New feature for foreach control structure
Groups: php.dev 
Request: Send a blank email to php-dev+get-47468@lists.php.net to get a copy of this message
From: php@leon.brooks.fdns.net Operating system: (all, using) Linux 2.2.18 PHP version: 4.0.4pl1 PHP Bug Type: Feature/Change Request Bug description: New feature for foreach control structure Would find it convenient to do this: $filehandle=fopen("file","r"); foreach ($filehandle as $line) { # process line (line ends stripped off) } fclose ($filehandle); ...and even this... $filehandle=fopen("file","r"); foreach ($filehandle as $line[]) { # $line[0] = whole line sans ends # $line[1] = first word (exploded out gawk-like) # $line[2] = second word, etc } fclose ($filehandle); ...just a thought. -- Edit Bug report at: http://bugs.php.net/?id=9441&edit=1

« previous php.dev (#47468) next »