3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace test { use nonexistent; class test { static function run(){ var_dump(nonexistent); existent; } } } namespace { define("test\\existent", "bug!", 1); test\test::run(); }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported in /in/s5lLn on line 15 Fatal error: Uncaught Error: Undefined constant "test\nonexistent" in /in/s5lLn:8 Stack trace: #0 /in/s5lLn(16): test\test::run() #1 {main} thrown in /in/s5lLn on line 8
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Deprecated: define(): Declaration of case-insensitive constants is deprecated in /in/s5lLn on line 15 Warning: Use of undefined constant nonexistent - assumed 'nonexistent' (this will throw an Error in a future version of PHP) in /in/s5lLn on line 8 string(11) "nonexistent"
Output for 7.2.0 - 7.2.33, 7.3.32 - 7.3.33
Warning: Use of undefined constant nonexistent - assumed 'nonexistent' (this will throw an Error in a future version of PHP) in /in/s5lLn on line 8 string(11) "nonexistent"
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25
Notice: Use of undefined constant nonexistent - assumed 'nonexistent' in /in/s5lLn on line 8 string(11) "nonexistent"

preferences:
165.38 ms | 402 KiB | 198 Q