3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php foreach (get_defined_constants(true) as $category => $constants) { foreach ($constants as $name => $value) { if ('SOL' != substr($name, 0, 3)) continue; echo $name.': '.$value;"\n"; } }
Output for 5.4.0 - 7.2.0
Output for 5.0.0 - 5.3.29
SOL_SOCKET: 1SOL_TCP: 6SOL_UDP: 17
Output for 4.3.0 - 4.3.10, 4.4.0 - 4.4.9
Warning: Wrong parameter count for get_defined_constants() in /in/qLWYo on line 4 Warning: Invalid argument supplied for foreach() in /in/qLWYo on line 4
Output for 4.3.11
Warning: Wrong parameter count for get_defined_constants() in /in/qLWYo on line 4