3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ini_set('default_socket_timeout', -1); //set -1, unless greater than 0, $fp = pfsockopen('127.0.0.1',6379, $en, $err); var_dump($fp); // print false var_dump($err); //print "success",yes, if connect Failed´╝î the error is "Success", i think is bug
Output for 5.4.42 - 5.6.28, 7.0.0 - 7.1.0
Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 (Connection refused) in /in/h5Lgm on line 3 bool(false) string(18) "Connection refused"
Output for hhvm-3.12.0
Warning: unable to connect to 127.0.0.1 [111]: Connection refused in /in/h5Lgm on line -1 bool(false) string(18) "Connection refused"
Output for hhvm-3.10.0
Warning: unable to connect to 127.0.0.1 [111]: Connection refused in /in/h5Lgm on line 3 bool(false) string(18) "Connection refused"
Output for 5.4.38 - 5.4.41
Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 (Network is unreachable) in /in/h5Lgm on line 3 bool(false) string(22) "Network is unreachable"
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.4.37
Warning: ini_set() has been disabled for security reasons in /in/h5Lgm on line 2 Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 (Network is unreachable) in /in/h5Lgm on line 3 bool(false) string(22) "Network is unreachable"
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/h5Lgm on line 5
Process exited with code 255.
Output for 4.3.5 - 4.4.9
Warning: ini_set() has been disabled for security reasons in /in/h5Lgm on line 2 Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 in /in/h5Lgm on line 3 bool(false) string(22) "Network is unreachable"
Output for 4.3.3 - 4.3.4
Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/h5Lgm on line 2 Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 in /in/h5Lgm on line 3 bool(false) string(22) "Network is unreachable"
Output for 4.3.2
Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/h5Lgm on line 2 Warning: pfsockopen(): php_hostconnect: connect failed in /in/h5Lgm on line 3 Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 in /in/h5Lgm on line 3 bool(false) string(22) "Network is unreachable"
Output for 4.3.1
Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/h5Lgm on line 2
Process exited with code 139.
Output for 4.3.0

Process exited with code 139.