3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('foo', 'foo', true); define('bar', 'bar', false); echo foo, FOO, bar, BAR;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
Warning: define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported in /in/p03K9 on line 3 foo Fatal error: Uncaught Error: Undefined constant "FOO" in /in/p03K9:6 Stack trace: #0 {main} thrown in /in/p03K9 on line 6
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/p03K9 on line 3 foo Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "foo" in /in/p03K9 on line 6 foobar Warning: Use of undefined constant BAR - assumed 'BAR' (this will throw an Error in a future version of PHP) in /in/p03K9 on line 6 BAR
Output for 7.2.0 - 7.2.33, 7.3.32 - 7.3.33
foofoobar Warning: Use of undefined constant BAR - assumed 'BAR' (this will throw an Error in a future version of PHP) in /in/p03K9 on line 6 BAR
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
foofoobar Notice: Use of undefined constant BAR - assumed 'BAR' in /in/p03K9 on line 6 BAR

preferences:
201.94 ms | 411 KiB | 5 Q