3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-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("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("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.0060.01318.41
8.3.50.0130.00321.93
8.3.40.0060.00918.60
8.3.30.0110.00418.96
8.3.20.0040.00420.16
8.3.10.0040.00421.85
8.3.00.0080.00020.82
8.2.180.0150.00016.75
8.2.170.0140.00722.96
8.2.160.0090.00919.04
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0030.00519.36
8.2.110.0060.00322.10
8.2.100.0090.00319.45
8.2.90.0040.00419.13
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0080.00017.80
8.2.50.0000.01018.07
8.2.40.0030.00719.76
8.2.30.0070.00017.96
8.2.20.0050.00217.56
8.2.10.0070.00017.72
8.2.00.0000.00717.79
8.1.280.0140.00025.92
8.1.270.0080.00022.14
8.1.260.0080.00326.35
8.1.250.0000.00928.09
8.1.240.0060.00323.88
8.1.230.0040.00719.16
8.1.220.0000.00817.77
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00517.42
8.1.180.0040.00418.57
8.1.170.0000.00818.62
8.1.160.0030.00522.14
8.1.150.0000.00818.57
8.1.140.0070.00017.30
8.1.130.0000.00717.88
8.1.120.0000.00717.41
8.1.110.0040.00417.29
8.1.100.0030.00317.39
8.1.90.0000.00717.27
8.1.80.0040.00417.38
8.1.70.0070.00017.37
8.1.60.0090.00017.54
8.1.50.0080.00017.50
8.1.40.0060.00317.47
8.1.30.0040.00417.55
8.1.20.0040.00417.66
8.1.10.0000.00717.51
8.1.00.0030.00617.47
8.0.300.0040.00418.77
8.0.290.0000.00717.18
8.0.280.0050.00218.37
8.0.270.0070.00017.20
8.0.260.0000.00816.76
8.0.250.0070.00016.88
8.0.240.0030.00316.97
8.0.230.0040.00416.99
8.0.220.0000.00716.91
8.0.210.0000.00716.89
8.0.200.0040.00416.84
8.0.190.0030.00316.98
8.0.180.0040.00416.81
8.0.170.0050.00316.91
8.0.160.0040.00416.93
8.0.150.0040.00416.87
8.0.140.0000.00716.91
8.0.130.0000.00613.34
8.0.120.0040.00416.89
8.0.110.0050.00216.96
8.0.100.0080.00016.75
8.0.90.0070.00016.84
8.0.80.0120.00916.89
8.0.70.0000.00716.90
8.0.60.0000.00717.02
8.0.50.0070.00016.96
8.0.30.0110.00817.08
8.0.20.0100.00817.40
8.0.10.0060.00316.95
8.0.00.0110.01116.74
7.4.330.0000.00515.27
7.4.320.0030.00316.39
7.4.300.0030.00316.54
7.4.290.0030.00316.45
7.4.280.0030.00316.43
7.4.270.0000.00716.50
7.4.260.0030.00316.53
7.4.250.0040.00416.53
7.4.240.0040.00416.54
7.4.230.0070.00016.27
7.4.220.0130.00316.31
7.4.210.0070.01216.54
7.4.200.0000.00716.65
7.4.190.0070.00016.61
7.4.160.0080.00816.45
7.4.150.0060.01217.40
7.4.140.0140.00517.86
7.4.130.0110.00916.43
7.4.120.0080.00816.44
7.4.110.0100.00716.49
7.4.100.0140.00316.52
7.4.90.0030.01316.40
7.4.80.0100.01319.39
7.4.70.0090.00916.40
7.4.60.0100.01016.41
7.4.50.0000.00716.36
7.4.40.0000.01922.77
7.4.30.0170.00416.38
7.4.00.0070.00714.75
7.3.330.0000.00513.11
7.3.320.0020.00213.05
7.3.310.0030.00316.16
7.3.300.0040.00416.24
7.3.290.0110.00316.24
7.3.280.0060.01016.17
7.3.270.0060.01617.40
7.3.260.0160.00316.26
7.3.250.0140.00316.37
7.3.240.0120.01216.39
7.3.230.0060.01216.39
7.3.210.0120.00916.39
7.3.200.0040.01219.39
7.3.190.0070.01516.14
7.3.180.0110.00816.33
7.3.170.0140.00316.27
7.3.160.0040.01516.58
7.3.120.0030.01314.58
7.2.330.0120.00616.43
7.2.320.0100.01316.71
7.2.310.0120.00616.51
7.2.300.0060.01016.27
7.2.290.0120.00416.63
7.2.60.0070.00716.77
7.2.00.0070.00719.44
7.1.200.0100.00015.75
7.1.70.0030.00917.31
7.1.60.0060.00717.15
7.1.50.0140.00817.15
7.1.00.0030.08022.34
7.0.200.0040.01616.85
7.0.140.0030.07021.95
7.0.60.0030.08719.86
7.0.50.0100.04717.80
7.0.40.0200.04020.26
7.0.30.0230.05020.04
7.0.20.0200.04320.34
7.0.10.0170.08020.04
7.0.00.0100.07320.20
5.6.210.0070.08720.50
5.6.200.0030.09018.08
5.6.190.0200.07720.41
5.6.180.2230.05320.63
5.6.170.0270.06720.52
5.6.160.0100.04320.61
5.6.150.0070.05718.17
5.6.140.0070.04018.23
5.6.130.0070.04018.19
5.6.120.0130.08020.93
5.6.110.0170.07721.12
5.6.100.0000.05321.13
5.6.90.0200.07321.04
5.6.80.0030.09320.36
5.5.350.0200.03320.37
5.5.340.0070.08317.95
5.5.330.0070.04720.56
5.5.320.0500.05020.30
5.5.310.0300.06020.32
5.5.300.0070.06718.05
5.5.290.0230.06317.93
5.5.280.0000.04720.77
5.5.270.0030.07720.79
5.5.260.0200.06020.88
5.5.250.0400.06020.61
5.5.240.0230.07320.27
5.4.450.0600.05319.58
5.4.440.0830.04019.54
5.4.430.1000.04019.56
5.4.420.0530.04319.45
5.4.410.0270.04019.08
5.4.400.0970.03318.89
5.4.390.0970.02719.18
5.4.380.0330.06018.74
5.4.370.0270.06018.77
5.4.360.0430.05018.64
5.4.350.0400.04718.77
5.4.340.0270.05318.74
5.4.320.0090.03612.49
5.4.310.0060.04012.49
5.4.300.0060.04612.49
5.4.290.0080.03912.48
5.4.280.0040.04712.38
5.4.270.0070.03612.38
5.4.260.0030.08319.02
5.4.250.0170.07018.66
5.4.240.0230.06318.79
5.4.230.0170.05018.64
5.4.220.0100.05018.80
5.4.210.0070.07718.61
5.4.200.0130.05718.81
5.4.190.0100.07318.70
5.4.180.0100.05018.84
5.4.170.0070.05319.01
5.4.160.0070.06318.99
5.4.150.0070.05318.65
5.4.140.0170.04316.46
5.4.130.0130.04316.52
5.4.120.0070.05016.35
5.4.110.0030.05716.38
5.4.100.0130.04716.28
5.4.90.0130.06016.30
5.4.80.0070.05016.25
5.4.70.0100.04716.30
5.4.60.0070.05016.50
5.4.50.0070.05016.33
5.4.40.0100.04716.43
5.4.30.0030.05716.34
5.4.20.0100.05016.27
5.4.10.0200.06016.36
5.4.00.0030.05015.77
5.3.290.0100.04912.80
5.3.280.0170.04014.75
5.3.270.0030.05714.73
5.3.260.0170.04714.76
5.3.250.0100.04714.76
5.3.240.0130.05314.39
5.3.230.0100.05314.70
5.3.220.0170.05314.43
5.3.210.0030.08714.35
5.3.200.0130.06314.59
5.3.190.0170.06314.46
5.3.180.0030.05714.34
5.3.170.0130.04314.41
5.3.160.0100.05714.56
5.3.150.0100.05314.58
5.3.140.0030.05314.71
5.3.130.0100.05014.41
5.3.120.0100.07014.57
5.3.110.0030.05714.43
5.3.100.0070.07014.05
5.3.90.0030.06013.80
5.3.80.0270.06314.04
5.3.70.0100.07013.94
5.3.60.0130.04313.86
5.3.50.0070.05313.81
5.3.40.0130.04313.98
5.3.30.0100.04713.80
5.3.20.0000.05713.53
5.3.10.0070.04713.53
5.3.00.0100.04713.52
5.2.170.0070.06011.08
5.2.160.0070.04011.14
5.2.150.0100.04711.08
5.2.140.0130.05311.06
5.2.130.0030.04311.02
5.2.120.0030.06010.95
5.2.110.0070.04011.11
5.2.100.0030.04311.04
5.2.90.0070.05310.99
5.2.80.0070.04310.93
5.2.70.0130.03311.19
5.2.60.0000.04710.82
5.2.50.0030.04311.18
5.2.40.0130.03310.84
5.2.30.0100.04010.73
5.2.20.0070.03710.86
5.2.10.0070.05010.82
5.2.00.0000.05310.80
5.1.60.0070.03010.04
5.1.50.0070.04310.00
5.1.40.0030.0409.98
5.1.30.0100.04710.30
5.1.20.0170.03310.51
5.1.10.0030.05310.16
5.1.00.0100.05010.16
5.0.50.0100.0338.53
5.0.40.0030.0308.45
5.0.30.0070.0408.29
5.0.20.0070.0238.25
5.0.10.0000.0338.24
5.0.00.0000.0438.13
4.4.90.0000.0235.99
4.4.80.0000.0235.99
4.4.70.0000.0235.98
4.4.60.0130.0135.98
4.4.50.0070.0205.98
4.4.40.0030.0335.98
4.4.30.0000.0275.98
4.4.20.0000.0235.98
4.4.10.0030.0275.98
4.4.00.0000.0475.98
4.3.110.0030.0205.98
4.3.100.0030.0205.98
4.3.90.0030.0175.98
4.3.80.0030.0335.98
4.3.70.0030.0235.98
4.3.60.0070.0275.98
4.3.50.0030.0205.98
4.3.40.0000.0335.98
4.3.30.0070.0205.98
4.3.20.0030.0205.98
4.3.10.0000.0275.98
4.3.00.0330.01712.80

preferences:
37.12 ms | 401 KiB | 5 Q