#50099 [NEW]: Suggestion: Deprecate sizeof

From: Date: Fri, 06 Nov 2009 12:35:10 +0000
Subject: #50099 [NEW]: Suggestion: Deprecate sizeof
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-144311@lists.php.net to get a copy of this message
From: martin dot contento at gmail dot com Operating system: Linux PHP version: 5.3SVN-2009-11-06 (SVN) PHP Bug Type: Feature/Change Request Bug description: Suggestion: Deprecate sizeof Description: ------------ Summary says it all: I would like to nominate "sizeof()" for deprecation. Reason: * sizeof already is only an alias of count * a deprecation warning would discourage people from using it, making php just a little bit more "unified" * "count" is the better name, sizeof could be confused with the C function which does something different (we all had a "sizeof(array) / sizeof(array[0])" macro, didn't we?) * it would end the (rather silly) "which function is faster" discussions around those two -- Edit bug report at http://bugs.php.net/?id=50099&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50099&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50099&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50099&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50099&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50099&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50099&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50099&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50099&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50099&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50099&r=support Expected behavior: http://bugs.php.net/fix.php?id=50099&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50099&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50099&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50099&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50099&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50099&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50099&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50099&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50099&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50099&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50099&r=mysqlcfg

« previous php.bugs (#144311) next »