3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $bar = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); echo (int) $foo, PHP_EOL, (int) $bar;
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function socket_create() in /in/QX5dk:2 Stack trace: #0 {main} thrown in /in/QX5dk on line 2
Process exited with code 255.
Output for 5.2.3 - 5.3.29, hhvm-3.10.0 - 3.12.0
4 5
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined function socket_create() in /in/QX5dk on line 2
Process exited with code 255.
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.2.2
1 2
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
1 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QX5dk on line 4 PHP_EOL2