Based on this discussion. We need to prevent Foo::Bar[0] in const expressions because that would allow you to run arbitrary code in a constant expression (through offsetGet). This should probably be mentioned in the RFC.
Here's the tests, maybe that will make more sense:
iluuu1994/php-src@4f4c314
Based on this discussion. We need to prevent
Foo::Bar[0]in const expressions because that would allow you to run arbitrary code in a constant expression (throughoffsetGet). This should probably be mentioned in the RFC.Here's the tests, maybe that will make more sense:
iluuu1994/php-src@4f4c314