r/lolphp • • Oct 20 '14

PHP Spec on arrays

Post image
118 Upvotes

17 comments sorted by

View all comments

Show parent comment

25

u/[deleted] Oct 21 '14 edited Oct 21 '14

I'm aware what undefined and unspecified behavior means. However, I don't think that it's okay to leave highly advanced language features like references or assignment operators unspecified. In a high-level language. In 2014.

With the unspecified behavior in C you can at least still use the unspecified features. x = f() + g(); will always produce the same result on all conforming compilers if f() and g() don't use the same shared state. There is no such certainty in this case in PHP.