3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); ini_set('display_errors', 1); $command = '/bin/bash -c "sleep 30"'; $dir = "/"; $pipes = array(); $error = $output = ""; $process = proc_open( $command, array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w') ), $pipes, $dir ); if (is_resource($process)) { $status = proc_get_status($process); printf("pid: %s running: %d exitcode: %d\n", $status['pid'], $status['running'], $status['exitcode']); print "killing proc_open'ed process\n"; posix_kill($status['pid'], 9); sleep(1); $status = proc_get_status($process); printf("pid: %s running: %d exitcode: %d\n", $status['pid'], $status['running'], $status['exitcode']); } else { printf("proc_open failed for command %s\n", $command); }

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.0090.00918.27
8.3.50.0110.00622.11
8.3.40.0090.00618.86
8.3.30.0000.01519.10
8.3.20.0040.00420.29
8.3.10.0040.00422.09
8.3.00.0080.00020.82
8.2.180.0120.00616.63
8.2.170.0070.00722.96
8.2.160.0070.00719.20
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00726.16
8.2.120.0040.00419.48
8.2.110.0100.00020.48
8.2.100.0000.01117.72
8.2.90.0040.00419.14
8.2.80.0030.00617.97
8.2.70.0040.00417.63
8.2.60.0090.00017.93
8.2.50.0000.00718.22
8.2.40.0050.00320.42
8.2.30.0000.00719.26
8.2.20.0040.00417.66
8.2.10.0050.00317.74
8.2.00.0000.00817.74
8.1.280.0140.00325.92
8.1.270.0000.00822.11
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0030.00721.24
8.1.230.0040.00720.27
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0030.00617.22
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0050.00318.54
8.1.160.0040.00418.79
8.1.150.0030.00520.08
8.1.140.0030.00517.44
8.1.130.0070.00017.88
8.1.120.0070.00017.33
8.1.110.0000.00717.35
8.1.100.0000.00717.45
8.1.90.0060.00317.42
8.1.80.0070.00017.36
8.1.70.0030.00317.39
8.1.60.0000.00917.51
8.1.50.0040.00417.44
8.1.40.0040.00417.44
8.1.30.0040.00417.57
8.1.20.0080.00017.55
8.1.10.0030.00617.48
8.1.00.0040.00417.57
8.0.300.0090.00018.78
8.0.290.0000.00716.75
8.0.280.0000.00718.31
8.0.270.0070.00017.20
8.0.260.0030.00316.75
8.0.250.0070.00016.99
8.0.240.0000.00716.96
8.0.230.0030.00316.97
8.0.220.0000.00716.79
8.0.210.0030.00316.83
8.0.200.0040.00416.84
8.0.190.0030.00316.99
8.0.180.0040.00316.85
8.0.170.0000.00716.92
8.0.160.0030.00517.01
8.0.150.0000.00716.80
8.0.140.0000.00716.76
8.0.130.0050.00013.47
8.0.120.0000.00816.86
8.0.110.0040.00416.91
8.0.100.0000.00716.93
8.0.90.0040.00416.95
8.0.80.0170.00316.81
8.0.70.0000.00716.88
8.0.60.0020.00516.70
8.0.50.0000.00716.96
8.0.30.0090.01117.04
8.0.20.0100.01017.40
8.0.10.0040.00416.98
8.0.00.0090.00916.67
7.4.330.0000.00515.14
7.4.320.0030.00316.52
7.4.300.0000.00716.45
7.4.290.0030.00316.42
7.4.280.0060.00316.52
7.4.270.0030.00316.50
7.4.260.0000.00816.41
7.4.250.0040.00416.51
7.4.240.0040.00416.42
7.4.230.0030.00316.27
7.4.220.0130.00716.57
7.4.210.0070.01116.53
7.4.200.0030.00316.61
7.4.190.0000.00716.63
7.4.160.0150.00316.52
7.4.150.0130.00317.40
7.4.140.0140.00317.86
7.4.130.0070.01216.44
7.4.120.0040.01516.45
7.4.110.0140.00316.36
7.4.100.0130.01016.43
7.4.90.0090.00916.50
7.4.80.0150.00319.39
7.4.70.0060.01316.38
7.4.60.0070.01016.53
7.4.50.0000.00416.48
7.4.40.0090.00622.77
7.4.30.0040.01316.41
7.4.00.0030.01215.10
7.3.330.0050.00013.17
7.3.320.0050.00013.24
7.3.310.0030.00316.04
7.3.300.0000.00616.19
7.3.290.0060.00916.25
7.3.280.0100.00616.22
7.3.270.0030.01617.40
7.3.260.0130.00316.36
7.3.250.0130.00616.29
7.3.240.0130.00316.19
7.3.230.0140.00916.39
7.3.210.0140.00316.47
7.3.200.0070.01019.39
7.3.190.0060.01616.27
7.3.180.0090.00616.15
7.3.170.0100.00716.29
7.3.160.0080.00816.20
7.3.120.0100.00314.71
7.3.10.0060.00616.39
7.3.00.0030.01016.40
7.2.330.0100.00716.55
7.2.320.0120.00616.36
7.2.310.0140.00616.51
7.2.300.0120.00416.66
7.2.290.0060.01016.25
7.2.130.0040.01116.73
7.2.120.0110.00316.88
7.2.110.0060.00916.60
7.2.100.0070.00716.79
7.2.90.0040.01116.66
7.2.80.0060.00916.69
7.2.70.0070.00716.74
7.2.60.0040.00916.87
7.2.50.0060.01216.53
7.2.40.0030.00916.43
7.2.30.0030.01016.76
7.2.20.0030.01016.82
7.2.10.0030.00716.90
7.2.00.0070.00717.79
7.1.250.0040.01115.76
7.1.200.0100.00315.88
7.1.100.0000.01718.00
7.1.70.0070.00717.37
7.1.60.0130.01419.82
7.1.50.0070.01017.17
7.1.00.0070.07722.39
7.0.200.0000.01016.91
7.0.140.0000.07722.00
7.0.60.0100.07719.91
7.0.50.0030.09317.89
7.0.40.0170.08320.09
7.0.30.0130.04720.20
7.0.20.0300.07320.16
7.0.10.0130.08320.00
7.0.00.0100.05320.08
5.6.280.0030.07721.08
5.6.210.0100.03320.70
5.6.200.0030.04018.18
5.6.190.0070.07020.39
5.6.180.0330.04720.77
5.6.170.0470.07320.42
5.6.160.0070.04720.44
5.6.150.0170.02718.23
5.6.140.0200.07318.19
5.6.130.0100.05318.19
5.6.120.0170.08020.99
5.6.110.0170.07320.96
5.6.100.0130.08320.98
5.6.90.0070.09021.04
5.6.80.0030.05020.43
5.6.70.4200.03320.48
5.5.350.0100.07720.45
5.5.340.0030.09017.88
5.5.330.0100.08020.57
5.5.320.0330.07720.27
5.5.310.0370.07720.50
5.5.300.0070.08018.05
5.5.290.0000.05018.04
5.5.280.0070.08020.73
5.5.270.0100.05020.89
5.5.260.0070.07720.80
5.5.250.0100.09020.59
5.5.240.0330.07020.19
5.4.450.0170.05019.63
5.4.440.0130.06719.49
5.4.430.0070.06719.69
5.4.420.0200.05019.35
5.4.410.0070.05719.02
5.4.400.0130.05018.55
5.4.390.0300.05718.77
5.4.380.0170.06018.74
5.4.370.0170.05018.73
5.4.360.0170.04318.56
5.4.350.0080.03712.00
5.4.340.0070.03412.00
5.4.320.0110.04712.49
5.4.310.0110.04212.48
5.4.300.0080.04412.48
5.4.290.0080.04412.48
5.4.280.0110.03612.38
5.4.270.0070.03812.38
5.4.260.0100.05018.84
5.4.250.0030.05718.72
5.4.240.0130.04718.96
5.4.230.0070.05319.02
5.4.220.0070.05718.62
5.4.210.0100.05318.86
5.4.200.0130.08018.84
5.4.190.0070.06018.70
5.4.180.0030.05718.72
5.4.170.0070.05318.61
5.4.160.0070.05718.94
5.4.150.0200.04319.00
5.4.140.0070.06716.30
5.4.130.0070.05716.35
5.4.120.0100.05016.32
5.4.110.0100.05016.28
5.4.100.0070.05016.33
5.4.90.0030.06716.30
5.4.80.0000.05716.44
5.4.70.0070.05016.38
5.4.60.0100.04716.47
5.4.50.0100.04316.53
5.4.40.0100.04716.47
5.4.30.0100.04716.39
5.4.20.0170.04016.43
5.4.10.0030.07316.38
5.4.00.0100.04315.83
5.3.290.0100.04312.80
5.3.280.0070.05314.45
5.3.270.0030.06014.46
5.3.260.0170.04714.39
5.3.250.0200.04314.65
5.3.240.0030.06314.38
5.3.230.0100.05014.60
5.3.220.0170.04714.30
5.3.210.0170.04314.57
5.3.200.0070.05014.62
5.3.190.0130.04714.57
5.3.180.0100.05014.58
5.3.170.0100.05014.59
5.3.160.0100.05014.27
5.3.150.0000.05714.48
5.3.140.0200.04014.40
5.3.130.0000.06014.45
5.3.120.0070.05314.55
5.3.110.0200.04014.71
5.3.100.0170.05714.19
5.3.90.0100.04713.79
5.3.80.0170.04313.91
5.3.70.0070.05014.03
5.3.60.0100.06314.02
5.3.50.0130.04013.97
5.3.40.0130.04313.97
5.3.30.0070.05013.91
5.3.20.0070.05713.63
5.3.10.0070.04713.66
5.3.00.0100.04713.43
5.2.170.0100.03711.30
5.2.160.0070.03710.99
5.2.150.0030.05011.07
5.2.140.0070.04311.30
5.2.130.0000.04711.20
5.2.120.0070.05011.26
5.2.110.0130.03711.04
5.2.100.0000.04311.12
5.2.90.0100.03711.03
5.2.80.0170.04711.25
5.2.70.0070.04311.11
5.2.60.0130.03311.02
5.2.50.0000.04710.95
5.2.40.0000.04710.93
5.2.30.0030.04310.82
5.2.20.0070.04310.80
5.2.10.0030.04310.85
5.2.00.0100.04310.81
5.1.60.0000.03710.09
5.1.50.0070.03310.07
5.1.40.0030.03710.02
5.1.30.0070.04010.24
5.1.20.0070.03310.26
5.1.10.0130.02710.14
5.1.00.0070.03710.14
5.0.50.0000.0338.52
5.0.40.0030.0278.57
5.0.30.0070.0408.23
5.0.20.0070.0338.27
5.0.10.0070.0278.16
5.0.00.0070.0538.14
4.4.90.0000.0276.25
4.4.80.0030.0206.25
4.4.70.0000.0236.25
4.4.60.0030.0206.25
4.4.50.0030.0236.25
4.4.40.0130.0236.25
4.4.30.0100.0136.25
4.4.20.0030.0206.25
4.4.10.0100.0136.25
4.4.00.0130.0236.25
4.3.110.0070.0206.25
4.3.100.0000.0236.25
4.3.90.0030.0206.25
4.3.80.0070.0276.25
4.3.70.0130.0106.25
4.3.60.0030.0176.25
4.3.50.0070.0176.25
4.3.40.0000.0336.25
4.3.30.0000.0236.25
4.3.20.0000.0236.25
4.3.10.0030.0206.25
4.3.00.0100.0236.36

preferences:
51.78 ms | 401 KiB | 5 Q