3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.13 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: pfsockopen(): Unable to connect to 127.0.0.1:6379 (Unknown error) in /in/h5Lgm on line 3 bool(false) NULL
Output for 8.0.0 - 8.0.12
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 7.4.26 - 7.4.33
Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 (Unknown error) in /in/h5Lgm on line 3 bool(false) NULL
Output for 5.4.42 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
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 7.3.32 - 7.3.33
Warning: pfsockopen(): unable to connect to 127.0.0.1:6379 (Unknown error) in /in/h5Lgm on line 3 bool(false) string(0) ""
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.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 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.3.11, 4.4.0 - 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.

preferences:
208.15 ms | 401 KiB | 357 Q