|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50099 Suggestion: Deprecate sizeof
Submitted: 2009-11-06 12:35 UTC Modified: 2010-12-01 16:30 UTC
Avg. Score:3.6 ± 1.3
Reproduced:4 of 5 (80.0%)
Same Version:1 (25.0%)
Same OS:3 (75.0%)
From: martin dot contento at gmail dot com Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: 5.3SVN-2009-11-06 (SVN) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: martin dot contento at gmail dot com
New email:
PHP Version: OS:


 [2009-11-06 12:35 UTC] martin dot contento at gmail dot com
Summary says it all: I would like to nominate "sizeof()" for deprecation.

* 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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-01 16:30 UTC]
-Package: Feature/Change Request +Package: Scripting Engine problem
 [2014-03-05 20:29 UTC] narf at devilix dot net
This should be considered for PHP6 (or whatever PHP5++ is called).
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 23 10:01:24 2020 UTC