Req #50099 [Opn->Sus]: Suggestion: Deprecate sizeof

From: Date: Fri, 08 Jan 2021 13:08:33 +0000
Subject: Req #50099 [Opn->Sus]: Suggestion: Deprecate sizeof
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231447@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 Updated by: cmb@php.net Reported by: martin dot contento at gmail dot com Summary: Suggestion: Deprecate sizeof -Status: Open +Status: Suspended 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 needs to be discussed on the internals mailing list, and may require an RFC[1]. Feel free to forward the request to the mailing list. For the time being, I'm suspending this ticket. [1] <https://wiki.php.net/rfc/howto> Previous Comments: ------------------------------------------------------------------------ [2014-03-05 20:29:08] narf at devilix dot net This should be considered for PHP6 (or whatever PHP5++ is called). ------------------------------------------------------------------------ [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 (#231447) next »