3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace { class test { } echo test::class_name . "\n"; } namespace test { class namespacetest { } echo namespacetest::class_name; }
based on sFTMv
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Undefined class constant 'class_name' in /in/Um9ho:8 Stack trace: #0 {main} thrown in /in/Um9ho on line 8
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Undefined class constant 'class_name' in /in/Um9ho on line 8
Process exited with code 255.