3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { const B = 'C'; } use A\B as __dir__; echo __dir__;
Output for 7.0.0 - 7.0.17, 7.1.0 - 7.1.3
Parse error: syntax error, unexpected '__dir__' (T_DIR), expecting identifier (T_STRING) in /in/uuGn4 on line 7
Process exited with code 255.

preferences:
169.24 ms | 1395 KiB | 29 Q