Den fre. 26. okt. 2018 kl. 18.03 skrev Levi Morrison <[email protected]>: > In my opinion "ideal" here is that our symbol tables are merged, so > referring to "trim" in any context will resolve to at most one symbol, > *and* that we also have a short-closure syntax for times when there > isn't a *perfect* function to use. > > In the next version of PHP I would really like to see some warnings > for when symbol names get re-used so that in the future we can merge > them with less of a BC break.
I like that idea a lot tbh, but I do worry a lot about the lookup time if we end up with a gigantic hashtable to hold all the symbols and the implications it has. In most contexts we know (based on the syntax) what we are looking for, however as it currently stands then it would not be clear wether to look for the constant "trim" or the procedural function "trim" in the example given, and if thats all the same, I can see that many things not utilizing this could be slower for no good reason (at least in my honest opinion). However I don't know if there is something sneaky we can do here. -- regards, Kalle Sommer Nielsen [email protected] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
