3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('TEST_A', 'A'); define('TEST_C', 'C'); foreach(get_defined_constants() as $name => $value) { if (strpos($name, 'TEST_') === 0) { echo "$name: $value\n"; } } echo "Done\n";
based on B8Q8u
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
TEST_A: A TEST_C: C Done
Output for hhvm-3.10.0 - 3.12.0
TEST_C: C TEST_A: A Done