3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Foo as Bar; use const meh as DEH; define('meh', 10, true); class Foo { function __construct() { echo 1; } } echo MEH;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported in /in/8asEd on line 5 Fatal error: Uncaught Error: Undefined constant "MEH" in /in/8asEd:10 Stack trace: #0 {main} thrown in /in/8asEd on line 10
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Deprecated: define(): Declaration of case-insensitive constants is deprecated in /in/8asEd on line 5 Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "meh" in /in/8asEd on line 10 10
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.32 - 7.3.33, 7.4.26
10

preferences:
197.29 ms | 402 KiB | 237 Q