Hi, 2015-03-07 17:41 GMT+01:00 Kalle Sommer Nielsen <ka...@php.net>: > I'm a big -1 on this, while I know it returns the memory size in a C > perspective, I think it makes perfect sense to remain an alias, it > would break lots of applications for a very tiny to nothing gain.
I don't think the alias make sense and is really misleading and I've seen sizeof("abc"); often enough (Don't get me wrong that's equally bad with count, but sizeof encourages that usage, imo). Having two functions that do exactly the same using different names for no good reason (one of them referring to a different operation in a more popular language) isn't optimal. Code using a deprecated sizeof call is trivial to fix. But:. I'm not sure if the cost involved is really worth it, after all some big projects enforce sizeof over count and github returns over 1.2m results for sizeof+php (many false positives from html files documenting c code etc., still a huge number) . Random first two projects with over 500 stars/or big installation base I found: http://area51.phpbb.com/docs/31x/coding-guidelines.html#general : "Use sizeof instead of count" https://github.com/atoum/atoum/blob/master/CC.md#arrays : "To get length of an array, use sizeof instead of count (no technical reason about that, it's just the current convention)". On the other side: Removal of sizeof is doable with a patch release for almost all projects and shouldn't really require more than 5 to 10 minutes (+ time to review the diff) for most projects. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php