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("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.0120.00918.55
8.3.50.0040.01118.02
8.3.40.0120.00318.85
8.3.30.0100.00319.04
8.3.20.0050.00320.20
8.3.10.0040.00422.05
8.3.00.0040.00420.50
8.2.180.0120.00616.63
8.2.170.0110.00322.96
8.2.160.0130.00719.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00419.72
8.2.110.0050.00522.16
8.2.100.0040.00819.58
8.2.90.0000.00919.09
8.2.80.0090.00018.03
8.2.70.0100.00017.49
8.2.60.0080.00017.80
8.2.50.0130.00318.07
8.2.40.0060.00319.73
8.2.30.0040.00417.88
8.2.20.0040.00417.64
8.2.10.0040.00417.66
8.2.00.0040.00417.75
8.1.270.0040.00422.05
8.1.260.0070.00026.35
8.1.250.0030.00528.09
8.1.240.0100.00023.98
8.1.230.0080.00319.21
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0000.00817.52
8.1.180.0040.00418.66
8.1.170.0000.00818.56
8.1.160.0040.00422.14
8.1.150.0040.00418.58
8.1.140.0030.00417.27
8.1.130.0040.00417.75
8.1.120.0000.00817.32
8.1.110.0030.00517.28
8.1.100.0050.00217.28
8.1.90.0050.00317.23
8.1.80.0000.00717.40
8.1.70.0030.00317.27
8.1.60.0040.00417.51
8.1.50.0000.00817.43
8.1.40.0040.00417.52
8.1.30.0000.00817.50
8.1.20.0040.00417.66
8.1.10.0030.00617.57
8.1.00.0000.00817.40
8.0.300.0040.00418.77
8.0.290.0000.00817.18
8.0.280.0050.00318.39
8.0.270.0000.00717.20
8.0.260.0030.00316.78
8.0.250.0030.00316.84
8.0.240.0000.00716.86
8.0.230.0030.00316.83
8.0.220.0030.00316.78
8.0.210.0000.00716.82
8.0.200.0040.00416.88
8.0.190.0030.00316.95
8.0.180.0040.00416.94
8.0.170.0000.00816.82
8.0.160.0060.00316.89
8.0.150.0040.00416.85
8.0.140.0000.00716.79
8.0.130.0050.00013.34
8.0.120.0030.00616.88
8.0.110.0050.00316.89
8.0.100.0040.00416.71
8.0.90.0000.00716.89
8.0.80.0060.01316.82
8.0.70.0000.00716.83
8.0.60.0000.00716.87
8.0.50.0040.00416.95
8.0.30.0120.00616.95
8.0.20.0090.01017.40
8.0.10.0070.00017.11
8.0.00.0110.01016.76
7.4.330.0030.00315.11
7.4.320.0000.00716.54
7.4.300.0070.00016.45
7.4.290.0030.00316.50
7.4.280.0070.00016.56
7.4.270.0070.00016.37
7.4.260.0000.00816.51
7.4.250.0000.00716.49
7.4.240.0050.00216.46
7.4.230.0030.00316.37
7.4.220.0080.00816.49
7.4.210.0100.00716.59
7.4.200.0050.00216.61
7.4.190.0000.00716.63
7.4.160.0110.00516.67
7.4.150.0040.01317.40
7.4.140.0120.00917.86
7.4.130.0070.01116.51
7.4.120.0100.01016.42
7.4.110.0070.01116.52
7.4.100.0140.00716.41
7.4.90.0090.00916.41
7.4.80.0090.01519.39
7.4.70.0100.00716.45
7.4.60.0110.00416.28
7.4.50.0000.00416.21
7.4.40.0080.00522.77
7.4.30.0100.00516.66
7.4.00.0060.01014.62
7.3.330.0000.00513.19
7.3.320.0000.00512.93
7.3.310.0050.00216.11
7.3.300.0030.00316.09
7.3.290.0150.00416.21
7.3.280.0090.01016.20
7.3.270.0070.01017.40
7.3.260.0030.01316.14
7.3.250.0090.00916.30
7.3.240.0040.01816.50
7.3.230.0100.00716.39
7.3.210.0100.01016.33
7.3.200.0120.00919.39
7.3.190.0030.01716.25
7.3.180.0090.00616.29
7.3.170.0070.01016.42
7.3.160.0060.00916.23
7.3.120.0030.01214.88
7.2.330.0120.01216.68
7.2.320.0060.01316.34
7.2.310.0100.01016.37
7.2.300.0080.00816.52
7.2.290.0130.00416.57
7.2.110.0400.00416.67
7.2.100.0150.00816.38
7.2.90.0080.00816.69
7.2.80.0120.00616.56
7.2.70.0120.00416.48
7.2.60.0090.00916.54
7.2.50.0140.00416.73
7.2.40.0180.00316.93
7.2.30.0080.00816.85
7.2.20.0160.00316.64
7.2.10.0240.00316.81
7.2.00.0070.00917.84
7.1.230.0090.00915.53
7.1.220.0270.00415.89
7.1.210.0180.00015.73
7.1.200.0110.00315.74
7.1.190.0070.00715.75
7.1.180.0260.01015.86
7.1.170.0140.00415.59
7.1.160.0100.00315.83
7.1.150.0090.01015.68
7.1.140.0110.00715.49
7.1.130.0060.01015.87
7.1.120.0150.00015.48
7.1.110.0370.01015.88
7.1.100.0080.00716.88
7.1.90.0120.00315.78
7.1.80.0470.00315.85
7.1.70.0080.00516.41
7.1.60.0120.01017.96
7.1.50.0100.01016.56
7.1.40.0090.00916.06
7.1.30.0040.01415.65
7.1.20.0670.01015.89
7.1.10.0110.00515.63
7.1.00.0080.04019.08
7.0.310.0090.00315.34
7.0.300.0070.01015.20
7.0.290.0140.00415.30
7.0.280.0180.00415.38
7.0.270.0140.00715.28
7.0.260.0120.00415.50
7.0.250.0150.00015.33
7.0.240.0130.00615.42
7.0.230.0140.00015.53
7.0.220.0100.00615.56
7.0.210.0070.01015.42
7.0.200.0080.00416.13
7.0.190.0130.00315.28
7.0.180.0150.00015.14
7.0.170.0080.00315.19
7.0.160.0130.00315.45
7.0.150.0070.01015.54
7.0.140.0060.04118.60
7.0.130.0120.00515.49
7.0.120.0110.00615.53
7.0.110.0120.00615.26
7.0.100.0070.00715.52
7.0.90.0110.00415.49
7.0.80.0130.00715.23
7.0.70.0150.00015.45
7.0.60.0070.04017.77
7.0.50.0080.03616.78
7.0.40.0090.02616.68
7.0.30.0340.03816.69
7.0.20.0150.02116.75
7.0.10.0090.02416.84
7.0.00.0130.04316.64
5.6.380.0120.00613.82
5.6.370.0140.00014.43
5.6.360.0100.00514.48
5.6.350.0120.00613.85
5.6.340.0120.00214.11
5.6.330.0110.00814.05
5.6.320.0100.00313.73
5.6.310.0150.00014.35
5.6.300.0120.00014.36
5.6.290.0100.00314.03
5.6.280.0060.04317.63
5.6.270.0170.00014.06
5.6.260.0110.00414.08
5.6.250.0140.00414.23
5.6.240.0040.01214.21
5.6.230.0100.00314.21
5.6.220.0140.00314.40
5.6.210.0050.02717.57
5.6.200.0140.04116.26
5.6.190.0090.04617.48
5.6.180.0210.03317.51
5.6.170.0230.04217.56
5.6.160.0100.02617.35
5.6.150.0090.04416.20
5.6.140.0050.04016.30
5.6.130.0150.03716.23
5.6.120.0110.04617.64
5.6.110.0150.04117.58
5.6.100.0070.04617.65
5.6.90.0080.03217.59
5.6.80.0070.03917.43
5.6.70.0120.02717.21
5.6.60.0140.00413.91
5.6.50.0120.00414.07
5.6.40.0110.00514.04
5.6.30.0100.00613.75
5.6.20.0110.00614.29
5.6.10.0160.00014.26
5.6.00.0100.00714.18
5.5.380.0110.00312.79
5.5.370.0070.00412.79
5.5.360.0060.00512.79
5.5.350.0180.03716.67
5.5.340.0030.05415.43
5.5.330.0070.03616.57
5.5.320.0210.02316.60
5.5.310.0160.01816.54
5.5.300.0100.03715.40
5.5.290.0070.02215.33
5.5.280.0080.02816.88
5.5.270.0090.04516.83
5.5.260.0070.02516.83
5.5.250.0110.02716.71
5.5.240.0240.04016.47
5.5.230.0100.00012.79
5.5.220.0100.00312.79
5.5.210.0120.00012.79
5.5.200.0130.00012.79
5.5.190.0080.00412.79
5.5.180.0110.00412.79
5.5.170.0170.00014.24
5.5.160.0100.00312.79
5.5.150.0100.00512.79
5.5.140.0100.00312.79
5.5.130.0110.00412.79
5.5.120.0080.00412.79
5.5.110.0150.00012.79
5.5.100.0110.00012.79
5.5.90.0110.00412.79
5.5.80.0070.00612.79
5.5.70.0120.00012.79
5.5.60.0040.01112.79
5.5.50.0100.00312.79
5.5.40.0060.00312.79
5.5.30.0070.00712.79
5.5.20.0130.00012.79
5.5.10.0090.00312.79
5.5.00.0090.00312.79
5.4.450.0030.02516.14
5.4.440.0030.04515.96
5.4.430.0090.03516.13
5.4.420.0070.04115.97
5.4.410.0090.03516.07
5.4.400.0050.04215.94
5.4.390.0100.03715.93
5.4.380.0040.04115.79
5.4.370.0060.04215.80
5.4.360.0070.04215.93
5.4.350.0070.04215.86
5.4.340.0080.04116.02
5.4.330.0070.00612.79
5.4.320.0100.03815.80
5.4.310.0060.02315.84
5.4.300.0050.02215.93
5.4.290.0070.02215.94
5.4.280.0150.03515.97
5.4.270.0080.03815.86
5.4.260.0040.04515.94
5.4.250.0080.04015.96
5.4.240.0060.04115.85
5.4.230.0060.04115.93
5.4.220.0090.04115.92
5.4.210.0080.04115.94
5.4.200.0070.04316.00
5.4.190.0030.04315.99
5.4.180.0070.03015.97
5.4.170.0050.04016.01
5.4.160.0060.04116.00
5.4.150.0050.04515.91
5.4.140.0070.04014.56
5.4.130.0050.04014.53
5.4.120.0060.03814.55
5.4.110.0020.04614.63
5.4.100.0110.03514.61
5.4.90.0050.04114.66
5.4.80.0020.04614.60
5.4.70.0060.03714.60
5.4.60.0050.02514.62
5.4.50.0040.02214.65
5.4.40.0040.04314.63
5.4.30.0070.01814.60
5.4.20.0060.04114.63
5.4.10.0060.04014.64
5.4.00.0050.03714.29
5.3.290.0080.03813.72
5.3.280.0060.03613.61
5.3.270.0020.04313.68
5.3.260.0080.04113.62
5.3.250.0050.03813.63
5.3.240.0080.04013.62
5.3.230.0090.04013.74
5.3.220.0080.03813.67
5.3.210.0110.03913.62
5.3.200.0040.04413.72
5.3.190.0060.03913.61
5.3.180.0030.04113.62
5.3.170.0040.02113.64
5.3.160.0080.01813.59
5.3.150.0080.01813.67
5.3.140.0040.02313.63
5.3.130.0070.03813.66
5.3.120.0060.04013.64
5.3.110.0070.04013.60
5.3.100.0060.03713.38
5.3.90.0060.03713.34
5.3.80.0080.04213.35
5.3.70.0020.04113.30
5.3.60.0060.04013.32
5.3.50.0080.03813.28
5.3.40.0040.03413.29
5.3.30.0080.03213.25
5.3.20.0020.04113.27
5.3.10.0060.03013.24
5.3.00.0070.03513.20
5.2.170.0060.03212.69
5.2.160.0040.03612.69
5.2.150.0090.02812.69
5.2.140.0050.03312.69
5.2.130.0050.03312.69
5.2.120.0070.03412.69
5.2.110.0050.02512.69
5.2.100.0040.03312.69
5.2.90.0050.03312.69
5.2.80.0060.02912.69
5.2.70.0060.03312.69
5.2.60.0030.03012.69
5.2.50.0050.03312.69
5.2.40.0050.03312.69
5.2.30.0070.03012.69
5.2.20.0130.03012.69
5.2.10.0070.02412.69
5.2.00.0030.03112.69
5.1.60.0070.02712.69
5.1.50.0060.02012.69
5.1.40.0030.02812.69
5.1.30.0060.03012.69
5.1.20.0060.03012.69
5.1.10.0000.03212.69
5.1.00.0040.03212.69
5.0.50.0050.02112.69
5.0.40.0000.01212.69
5.0.30.0030.03312.69
5.0.20.0030.01012.69
5.0.10.0040.01112.69
5.0.00.0000.01812.69
4.4.90.0030.01512.69
4.4.80.0020.02012.69
4.4.70.0070.01512.69
4.4.60.0000.02212.69
4.4.50.0040.01512.69
4.4.40.0000.03112.69
4.4.30.0060.01712.69
4.4.20.0040.01912.69
4.4.10.0020.01812.69
4.4.00.0020.01412.69
4.3.110.0030.00712.69
4.3.100.0030.00812.69
4.3.90.0000.01312.69
4.3.80.0020.01512.69
4.3.70.0020.01012.69
4.3.60.0020.01512.69
4.3.50.0020.01912.69
4.3.40.0000.03012.69
4.3.30.0030.02012.69
4.3.20.0000.01912.69
4.3.10.0000.02012.69
4.3.00.0000.01912.69

preferences:
78.16 ms | 400 KiB | 5 Q