From: [EMAIL PROTECTED] 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