Bug #16857: short if assignment syntax for static vars

From: Date: Fri, 26 Apr 2002 16:09:37 +0000
Subject: Bug #16857: short if assignment syntax for static vars
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6142@lists.php.net to get a copy of this message
From: msopacua@idg.nl Operating system: Any PHP version: 4.2.0 PHP Bug Type: Feature/Change Request Bug description: short if assignment syntax for static vars Would be nice if this worked. But the short syntax isn't accepted for a static var, even it's not in the initial declaration. <?php function sql_num_rows($result) { static $cmd='undefined'; if($cmd == 'undefined') { $cmd=($this->pg_new_api) ? 'pg_num_rows' : 'pg_numrows'; } return @$cmd($result); } ?> -- Edit bug report at http://bugs.php.net/?id=16857&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16857&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16857&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16857&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16857&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16857&r=support Expected behavior: http://bugs.php.net/fix.php?id=16857&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16857&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16857&r=submittedtwice

« previous php.bugs (#6142) next »