3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Send POST request to https://secure.example.com/form_action.php * Include form elements named "foo" and "bar" with dummy values */ $sock = fsockopen("ssl://secure.example.com", 443, $errno, $errstr, 30); if (!$sock) die("$errstr ($errno)\n"); $data = "foo=" . urlencode("Value for Foo") . "&bar=" . urlencode("Value for Bar"); fwrite($sock, "POST /form_action.php HTTP/1.0\r\n"); fwrite($sock, "Host: secure.example.com\r\n"); fwrite($sock, "Content-type: application/x-www-form-urlencoded\r\n"); fwrite($sock, "Content-length: " . strlen($data) . "\r\n"); fwrite($sock, "Accept: */*\r\n"); fwrite($sock, "\r\n"); fwrite($sock, $data); $headers = ""; while ($str = trim(fgets($sock, 4096))) $headers .= "$str\n"; echo "\n"; $body = ""; while (!feof($sock)) $body .= fgets($sock, 4096); fclose($sock); ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Warning: fsockopen(): Unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0)
Output for 8.1.28
Warning: fsockopen(): Unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (1)
Output for 5.2.3 - 5.2.5, 5.3.11 - 5.3.13, 5.3.18 - 5.3.19, 5.3.23, 5.3.25, 5.3.27 - 5.3.29, 5.4.0 - 5.4.14, 7.2.0 - 7.2.33, 7.3.30 - 7.3.33, 7.4.0 - 7.4.33
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0)
Output for 7.3.29
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (22100)
Output for 7.3.28
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (22048)
Output for 7.3.27
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21933)
Output for 7.3.26
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21857)
Output for 7.3.25
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21859)
Output for 7.3.24
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21903)
Output for 7.3.23
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (22075)
Output for 7.3.21
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21853)
Output for 7.3.20
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21856)
Output for 7.3.19
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (22001)
Output for 7.3.18
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (22043)
Output for 7.3.17
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21995)
Output for 7.3.16
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (21905)
Output for 7.3.0 - 7.3.12
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (1852400175)
Output for 7.1.25
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32573)
Output for 7.1.20
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32589)
Output for 7.0.20, 7.1.5 - 7.1.10
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: System error in /in/H16gS on line 6 Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (php_network_getaddresses: getaddrinfo failed: System error) in /in/H16gS on line 6 php_network_getaddresses: getaddrinfo failed: System error (0)
Output for 5.4.15 - 5.4.45, 5.5.0 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.14, 7.1.0
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/H16gS on line 6 Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /in/H16gS on line 6 php_network_getaddresses: getaddrinfo failed: Name or service not known (0)
Output for 5.3.10, 5.3.14 - 5.3.17, 5.3.20 - 5.3.22, 5.3.24, 5.3.26
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (-1)
Output for 5.3.9
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32590)
Output for 5.3.8
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32735)
Output for 5.3.7
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32713)
Output for 5.3.6
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32608)
Output for 5.3.5
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32622)
Output for 5.3.4
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32531)
Output for 5.3.3
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32593)
Output for 5.3.2
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32704)
Output for 5.3.1
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32563)
Output for 5.3.0
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32674)
Output for 5.2.9, 5.2.12, 5.2.16 - 5.2.17
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32766)
Output for 5.2.11, 5.2.14 - 5.2.15
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32765)
Output for 5.2.10, 5.2.13
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32764)
Output for 5.2.6 - 5.2.8
Warning: fsockopen(): unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /in/H16gS on line 6 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32767)
Output for 5.0.4 - 5.0.5, 5.1.0 - 5.1.6, 5.2.1 - 5.2.2
<br /> <b>Warning</b>: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport &quot;ssl&quot; - did you forget to enable it when you configured PHP?) in <b>/in/H16gS</b> on line <b>6</b><br /> Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0)
Output for 5.2.0
<br /> <b>Warning</b>: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport &quot;ssl&quot; - did you forget to enable it when you configured PHP?) in <b>/in/H16gS</b> on line <b>6</b><br /> Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (32767)
Output for 5.0.0 - 5.0.3
<br /> <b>Warning</b>: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://secure.example.com:443 (Unable to find the socket transport &quot;ssl&quot; - did you forget to enable it when you configured PHP?) in <b>/in/H16gS</b> on line <b>6</b><br /> Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (124)
Output for 4.4.3 - 4.4.9
<br /> <b>Warning</b>: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: no SSL support in this build in <b>/in/H16gS</b> on line <b>6</b><br /> <br /> <b>Warning</b>: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to secure.example.com:443 in <b>/in/H16gS</b> on line <b>6</b><br /> Success (0)
Output for 4.3.3 - 4.3.11, 4.4.0 - 4.4.2
<br /> <b>Warning</b>: fsockopen(): no SSL support in this build in <b>/in/H16gS</b> on line <b>6</b><br /> <br /> <b>Warning</b>: fsockopen(): unable to connect to secure.example.com:443 in <b>/in/H16gS</b> on line <b>6</b><br /> Success (0)
Output for 4.3.2
<br /> <b>Warning</b>: fsockopen(): no SSL support in this build in <b>/in/H16gS</b> on line <b>6</b><br /> <br /> <b>Warning</b>: fsockopen(): unable to connect to secure.example.com:443 in <b>/in/H16gS</b> on line <b>6</b><br /> Inappropriate ioctl for device (25)
Output for 4.3.0 - 4.3.1

Process exited with code 139.

preferences:
233.98 ms | 401 KiB | 361 Q