3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get() { return SOME_CONST; } define('sOmE_CoNsT', 1, true); echo get(); // Prints 1 define('SOME_CONST', 2); echo get(); // Prints 2

preferences:
49.73 ms | 407 KiB | 5 Q