3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isAlive($services) { foreach ($services as $address => $port) { $service = array( "address" => $address, "port" => $port, "errno" => "", "errstr" => "", "alive" => false ); $sock = @fsockopen($address, $port, $service["errno"], $service["errstr"], 5); if ($sock) { fprintf($sock, "GET / HTTP/1.0\r\n"); fprintf($sock, "\r\n"); $service["response"] = stream_get_contents($sock); if ($service["response"]) { $service["alive"] = true; } fclose($sock); } yield $service; } } $services = array( "php.net" => 80, "explain.so" => 80, "do1asdasdas.net" => 80 ); foreach (isAlive($services) as $service) { if (!$service["alive"]) { printf( "%s:%d: failure (%d) %s\n", $service["address"], $service["port"], $service["errno"], $service["errstr"]); } else { printf( "%s:%d: alive: %d bytes\n", $service["address"], $service["port"], strlen($service["response"])); } } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0130.00918.71
8.3.50.0200.00921.27
8.3.40.0140.00719.17
8.3.30.0100.00320.54
8.3.20.0150.00419.15
8.3.10.0040.00421.43
8.3.00.0000.00823.98
8.2.180.0090.00916.63
8.2.170.0040.01122.96
8.2.160.0140.00319.29
8.2.150.0040.00425.66
8.2.140.0090.00924.66
8.2.130.0080.00826.16
8.2.120.0060.01220.01
8.2.110.0030.00720.77
8.2.100.0060.00618.03
8.2.90.0050.00318.13
8.2.80.0090.00019.02
8.2.70.0030.00517.63
8.2.60.0030.00518.29
8.2.50.0050.00318.07
8.2.40.0100.00318.27
8.2.30.0080.00019.70
8.2.20.0000.00817.85
8.2.10.0060.00318.02
8.2.00.0040.00418.06
8.1.280.0110.00425.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0150.00021.96
8.1.230.0080.00424.18
8.1.220.0000.00917.91
8.1.210.0060.00318.77
8.1.200.0030.00617.47
8.1.190.0040.00417.75
8.1.180.0030.00518.10
8.1.170.0080.00018.71
8.1.160.0040.00419.14
8.1.150.0050.00318.79
8.1.140.0040.00417.56
8.1.130.0000.00718.04
8.1.120.0000.00817.72
8.1.110.0000.00717.57
8.1.100.0000.00817.58
8.1.90.0000.00817.70
8.1.80.0040.00417.68
8.1.70.0000.00817.50
8.1.60.0060.00317.72
8.1.50.0030.00517.63
8.1.40.0040.00417.75
8.1.30.0050.00317.73
8.1.20.0030.00517.84
8.1.10.0040.00417.68
8.1.00.0000.00817.61
8.0.300.0000.00818.77
8.0.290.0080.00316.88
8.0.280.0000.00718.65
8.0.270.0050.00317.45
8.0.260.0030.00417.09
8.0.250.0040.00417.06
8.0.240.0100.00317.08
8.0.230.0000.00717.13
8.0.220.0030.00517.07
8.0.210.0030.00317.13
8.0.200.0000.00617.14
8.0.190.0040.00417.16
8.0.180.0100.00017.15
8.0.170.0030.00516.96
8.0.160.0000.00716.95
8.0.150.0000.00817.01
8.0.140.0000.00916.96
8.0.130.0060.00013.77
8.0.120.0040.00417.23
8.0.110.0080.00017.24
8.0.100.0000.00817.13
8.0.90.0040.00417.25
8.0.80.0100.00717.22
8.0.70.0030.00517.31
8.0.60.0040.00417.13
8.0.50.0090.00017.23
8.0.30.0120.00817.35
8.0.20.0130.00717.40
8.0.10.0000.00717.29
8.0.00.0120.00817.09
7.4.330.0050.00016.98
7.4.320.0030.00316.64
7.4.300.0060.00016.73
7.4.290.0000.00716.60
7.4.280.0030.00316.68
7.4.270.0070.00016.54
7.4.260.0000.00513.54
7.4.250.0080.00016.73
7.4.240.0000.00716.82
7.4.230.0000.00716.58
7.4.220.0190.00016.69
7.4.210.0100.00916.84
7.4.200.0070.00016.77
7.4.190.0040.00417.00
7.4.160.0130.00616.71
7.4.150.0070.01317.40
7.4.140.0110.00817.86
7.4.130.0070.01216.78
7.4.120.0140.00716.72
7.4.110.0140.00616.54
7.4.100.0090.00916.68
7.4.90.0160.01016.87
7.4.80.0030.01519.39
7.4.70.0080.01116.79
7.4.60.0120.01216.82
7.4.50.0040.00416.80
7.4.40.0070.00522.77
7.4.30.0120.00616.76
7.4.00.0090.00615.24
7.3.330.0000.00613.41
7.3.320.0030.00313.50
7.3.310.0000.00816.55
7.3.300.0000.00716.52
7.3.290.0090.00916.64
7.3.280.0130.00916.70
7.3.270.0200.00317.40
7.3.260.0120.00918.24
7.3.250.0100.00916.68
7.3.240.0120.00616.65
7.3.230.0040.01416.76
7.3.210.0070.01116.74
7.3.200.0150.00919.39
7.3.190.0080.01616.58
7.3.180.0100.00716.59
7.3.170.0070.01416.89
7.3.160.0140.00416.66
7.3.120.0060.00915.11
7.3.10.0080.00817.05
7.3.00.0040.00816.69
7.2.330.0070.01216.75
7.2.320.0120.01216.66
7.2.310.0120.01317.09
7.2.300.0140.00316.96
7.2.290.0000.01716.95
7.2.130.0070.00317.04
7.2.120.0080.00516.94
7.2.110.0040.01117.15
7.2.100.0060.00816.93
7.2.90.0060.00716.81
7.2.80.0050.00516.95
7.2.70.0080.00717.19
7.2.60.0030.01017.26
7.2.50.0080.00917.19
7.2.40.0070.00917.02
7.2.30.0080.00717.16
7.2.20.0040.01017.16
7.2.10.0040.00917.10
7.2.00.0070.00918.13
7.1.250.0110.00016.07
7.1.240.0110.00315.96
7.1.230.0070.00715.80
7.1.220.0140.00315.74
7.1.210.0090.00315.94
7.1.200.0040.00915.97
7.1.190.0070.00715.98
7.1.180.0100.00315.95
7.1.170.0070.00715.89
7.1.160.0050.00515.85
7.1.150.0090.00616.16
7.1.140.0070.00716.15
7.1.130.0060.00915.82
7.1.120.0030.01015.92
7.1.110.0040.01116.15
7.1.100.0060.00917.04
7.1.90.0090.00616.01
7.1.80.0050.00316.09
7.1.70.0050.00616.68
7.1.60.0070.01217.40
7.1.50.0060.00816.59
7.1.40.0070.00716.01
7.1.30.0000.00715.70
7.1.20.0070.00716.11
7.1.10.0030.01016.02
7.1.00.0050.02019.27
7.0.320.0090.00615.47
7.0.310.0100.00315.78
7.0.300.0090.00015.36
7.0.290.0070.00815.70
7.0.280.0030.00615.68
7.0.270.0040.00715.63
7.0.260.0030.00615.73
7.0.250.0070.00715.49
7.0.240.0070.01015.68
7.0.230.0080.00515.45
7.0.220.0080.00815.76
7.0.210.0090.00315.63
7.0.200.0040.00616.51
7.0.190.0000.00815.73
7.0.180.0090.00415.65
7.0.170.0030.00915.66
7.0.160.0100.00415.73
7.0.150.0060.00315.68
7.0.140.0050.04018.90
7.0.130.0070.00415.73
7.0.120.0030.00815.84
7.0.110.0040.00815.82
7.0.100.0270.04718.03
7.0.90.0220.03818.03
7.0.80.0070.02617.93
7.0.70.0140.02017.93
7.0.60.0080.02717.92
7.0.50.0120.01918.33
7.0.40.0040.04517.00
7.0.30.0070.03117.16
7.0.20.0100.04517.18
7.0.10.0130.02517.11
7.0.00.0080.03816.95
5.6.380.0090.00614.81
5.6.370.0090.00614.63
5.6.360.0040.01114.97
5.6.350.0060.00314.53
5.6.340.0090.00614.61
5.6.330.0000.01614.83
5.6.320.0090.00014.45
5.6.310.0060.00914.21
5.6.300.0100.00314.27
5.6.290.0090.00314.92
5.6.280.0060.03917.94
5.6.270.0090.00614.30
5.6.260.0070.00014.72
5.6.250.0100.04218.01
5.6.240.0070.02717.93
5.6.230.0070.03117.79
5.6.220.0080.02317.79
5.6.210.0070.02317.58
5.6.200.0130.03618.09
5.6.190.0050.02718.10
5.6.180.0070.02718.05
5.6.170.0090.04418.08
5.6.160.0050.03318.11
5.6.150.0060.04318.01
5.6.140.0100.04018.01
5.6.130.0090.04017.99
5.6.120.0050.04318.21
5.6.110.0030.02817.88
5.6.100.0070.02618.01
5.6.90.0080.02118.03
5.6.80.0080.02217.52
5.6.70.0070.03417.65
5.6.60.0030.02617.50
5.6.50.0060.02317.71
5.6.40.0060.02317.70
5.6.30.0070.02517.65
5.6.20.0020.04817.81
5.6.10.0080.02817.57
5.6.00.0080.03017.79
5.5.380.0070.03216.08
5.5.370.0080.02216.19
5.5.360.0100.02515.87
5.5.350.0010.02616.17
5.5.340.0050.04216.12
5.5.330.0040.03516.37
5.5.320.0080.03016.34
5.5.310.0070.04516.22
5.5.300.0050.04016.48
5.5.290.0070.04216.33
5.5.280.0080.04116.09
5.5.270.0030.02616.30
5.5.260.0050.02416.45
5.5.250.0050.02315.99
5.5.240.0050.03016.04
5.5.230.0030.02315.93
5.5.220.0060.01815.94
5.5.210.0020.02315.91
5.5.200.0030.02515.78
5.5.190.0070.02016.01
5.5.180.0070.02116.08
5.5.170.0070.00714.72
5.5.160.0080.02615.92
5.5.150.0070.03815.77
5.5.140.0070.04216.15
5.5.130.0080.04115.96
5.5.120.0050.04315.84
5.5.110.0080.04216.18
5.5.100.0100.04216.10
5.5.90.0060.03815.99
5.5.80.0070.04016.05
5.5.70.0030.04015.76
5.5.60.0090.02715.94
5.5.50.0070.04015.98
5.5.40.0110.03615.95
5.5.30.0100.03815.83
5.5.20.0080.03315.76
5.5.10.0130.03815.94
5.5.00.0130.02215.88
5.4.450.0050.02015.13
5.4.440.0020.02615.25
5.4.430.0050.02015.22
5.4.420.0080.03015.27
5.4.410.0100.01315.18
5.4.400.0050.03215.06
5.4.390.0040.02015.01
5.4.380.0050.02015.10
5.4.370.0100.02515.10
5.4.360.0020.02215.06
5.4.350.0000.04415.06
5.4.340.0050.03515.02
5.4.330.0050.00511.07
5.4.320.0080.02015.01
5.4.310.0090.04015.13
5.4.300.0050.04014.96
5.4.290.0060.04115.13
5.4.280.0070.04215.14
5.4.270.0080.03315.16
5.4.260.0070.03815.01
5.4.250.0100.03514.98
5.4.240.0050.04115.11
5.4.230.0080.03715.10
5.4.220.0120.03715.06
5.4.210.0070.04015.15
5.4.200.0150.02715.06
5.4.190.0090.03815.10
5.4.180.0050.04115.09
5.4.170.0030.04615.12
5.4.160.0110.01915.11
5.4.150.0030.04014.97
5.4.140.0020.04513.74
5.4.130.0070.02313.66
5.4.120.0050.03813.75
5.4.110.0030.04213.83
5.4.100.0090.03613.80
5.4.90.0060.03813.71
5.4.80.0120.03313.75
5.4.70.0080.03713.70
5.4.60.0020.04213.72
5.4.50.0070.02913.79
5.4.40.0080.03213.75
5.4.30.0070.03313.78
5.4.20.0030.02813.72
5.4.10.0050.04113.75
5.4.00.0070.03713.44
5.3.290.0020.02212.94
5.3.280.0080.03612.90
5.3.270.0030.02512.83
5.3.260.0090.03712.81
5.3.250.0030.03912.81
5.3.240.0030.04312.81
5.3.230.0080.03812.85
5.3.220.0050.04012.79
5.3.210.0050.02812.82
5.3.200.0100.03512.88
5.3.190.0060.04312.79
5.3.180.0050.03812.85
5.3.170.0050.02712.85
5.3.160.0030.04312.79
5.3.150.0090.02912.84
5.3.140.0070.03812.85
5.3.130.0140.03412.78
5.3.120.0110.03512.82
5.3.110.0080.03512.83
5.3.100.0050.04012.61
5.3.90.0130.03112.58
5.3.80.0030.03812.57
5.3.70.0030.04112.57
5.3.60.0000.04612.57
5.3.50.0040.03712.57
5.3.40.0070.02812.57
5.3.30.0080.03312.57
5.3.20.0030.03812.57
5.3.10.0020.03812.57
5.3.00.0030.04012.57
5.2.170.0050.01812.57
5.2.160.0050.03112.57
5.2.150.0030.03512.57
5.2.140.0060.03212.57
5.2.130.0060.02112.57
5.2.120.0070.03012.57
5.2.110.0070.02912.57
5.2.100.0010.03612.57
5.2.90.0070.03212.57
5.2.80.0050.03312.57
5.2.70.0060.02712.57
5.2.60.0000.02812.57
5.2.50.0040.02712.57
5.2.40.0010.03412.57
5.2.30.0070.03012.57
5.2.20.0120.02312.57
5.2.10.0060.02812.57
5.2.00.0000.03412.57
5.1.60.0060.02512.57
5.1.50.0070.02712.57
5.1.40.0060.02512.57
5.1.30.0000.03212.57
5.1.20.0020.03212.57
5.1.10.0040.03012.57
5.1.00.0060.02112.57
5.0.50.0050.02312.57
5.0.40.0030.01512.57
5.0.30.0030.02312.57
5.0.20.0050.02012.57
5.0.10.0030.02112.57
5.0.00.0030.03112.57
4.4.90.0020.02012.57
4.4.80.0030.01812.57
4.4.70.0020.02012.57
4.4.60.0050.01812.57
4.4.50.0000.02212.57
4.4.40.0020.02712.57
4.4.30.0000.02012.57
4.4.20.0050.01812.57
4.4.10.0000.02012.57
4.4.00.0000.03212.57
4.3.110.0020.02012.57
4.3.100.0000.02312.57
4.3.90.0020.02012.57
4.3.80.0020.02612.57
4.3.70.0020.02012.57
4.3.60.0030.01512.57
4.3.50.0020.01812.57
4.3.40.0030.02812.57
4.3.30.0020.02012.57
4.3.20.0030.01812.57
4.3.10.0000.02212.57
4.3.00.0030.01612.57

preferences:
54.8 ms | 401 KiB | 5 Q