Req #50099 [Com]: Suggestion: Deprecate sizeof

From: Date: Wed, 05 Mar 2014 20:29:08 +0000
Subject: Req #50099 [Com]: Suggestion: Deprecate sizeof
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184537@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50099&edit=1 ID: 50099 Comment by: narf at devilix dot net Reported by: martin dot contento at gmail dot com Summary: Suggestion: Deprecate sizeof Status: Open Type: Feature/Change Request Package: Scripting Engine problem Operating System: Linux PHP Version: 5.3SVN-2009-11-06 (SVN) Block user comment: N Private report: N New Comment: This should be considered for PHP6 (or whatever PHP5++ is called). Previous Comments: ------------------------------------------------------------------------ [2009-11-06 12:35:09] martin dot contento at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=50099&edit=1

« previous php.bugs (#184537) next »