3v4l.org

run code in 300+ PHP versions simultaneously
<?php $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("file", "/tmp/error-output.txt", "a") // stderr is a file to write to ); $cwd = '/tmp'; $env = array('some_option' => 'aeiou'); $process = proc_open('php', $descriptorspec, $pipes, $cwd, $env); if (is_resource($process)) { // $pipes now looks like this: // 0 => writeable handle connected to child stdin // 1 => readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt fwrite($pipes[0], '<?php print_r($_ENV); ?>'); fclose($pipes[0]); echo stream_get_contents($pipes[1]); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); echo "command returned $return_value\n"; } ?>

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.00916.63
8.3.50.0150.00721.90
8.3.40.0060.01220.13
8.3.30.0110.00519.99
8.3.20.0080.00521.92
8.3.10.0100.00523.56
8.3.00.0090.00619.23
8.2.180.0160.00318.29
8.2.170.0070.01221.82
8.2.160.0100.00821.18
8.2.150.0040.00921.67
8.2.140.0070.00622.45
8.2.130.0120.00623.43
8.2.120.0080.00520.72
8.2.110.0100.00421.63
8.2.100.0100.00519.41
8.2.90.0100.00319.26
8.2.80.0050.00720.18
8.2.70.0080.01119.37
8.2.60.0110.00719.41
8.2.50.0140.00519.62
8.2.40.0140.00419.31
8.2.30.0090.00819.36
8.2.20.0130.00419.31
8.2.10.0140.00319.27
8.2.00.0130.00519.33
8.1.280.0140.00425.92
8.1.270.0070.00623.91
8.1.260.0080.00525.04
8.1.250.0130.00225.99
8.1.240.0080.00521.45
8.1.230.0090.00520.58
8.1.220.0060.00719.21
8.1.210.0070.00619.48
8.1.200.0060.01219.39
8.1.190.0090.00719.33
8.1.180.0120.01019.16
8.1.170.0060.01119.34
8.1.160.0130.00519.26
8.1.150.0130.00519.29
8.1.140.0060.01118.49
8.1.130.0130.00318.47
8.1.120.0110.00518.37
8.1.110.0090.00919.29
8.1.100.0100.00619.91
8.1.90.0090.00619.31
8.1.80.0110.00419.78
8.1.70.0160.00019.42
8.1.60.0140.00219.22
8.1.50.0110.00519.33
8.1.40.0130.00319.34
8.1.30.0020.01020.01
8.1.20.0040.01120.02
8.1.10.0060.00619.88
8.1.00.0040.00819.76
8.0.300.0060.00718.96
8.0.290.0150.00317.94
8.0.280.0130.00618.19
8.0.270.0110.00818.04
8.0.260.0120.00418.27
8.0.250.0130.00617.98
8.0.240.0140.00418.24
8.0.230.0120.00818.14
8.0.220.0170.00718.04
8.0.210.0130.00518.11
8.0.200.0130.00418.23
8.0.190.0110.01018.06
8.0.180.0120.00318.11
8.0.170.0160.00518.10
8.0.160.0140.00318.18
8.0.150.0110.00818.06
8.0.140.0140.00418.25
8.0.130.0110.00618.13
8.0.120.0200.00218.10
8.0.110.0100.00718.16
8.0.100.0140.00518.06
8.0.90.0130.00518.06
8.0.80.0090.00917.97
8.0.70.0090.00618.83
8.0.60.0120.00418.18
8.0.50.0140.00518.01
8.0.30.0030.00919.02
8.0.20.0110.00418.29
8.0.10.0150.00518.04
8.0.00.0150.00418.96
7.4.330.0100.00518.75
7.4.320.0170.00417.83
7.4.300.0190.00517.88
7.4.290.0250.00517.85
7.4.280.0200.00417.87
7.4.270.0170.00617.93
7.4.260.0200.00317.89
7.4.250.0170.00617.82
7.4.240.0230.00717.87
7.4.230.0220.00717.96
7.4.220.0180.00717.83
7.4.210.0180.00817.82
7.4.200.0190.00517.81
7.4.190.0110.01117.98
7.4.180.0210.00418.06
7.4.160.0160.00917.89
7.4.150.0190.00617.73
7.4.140.0200.00917.71
7.4.130.0170.00917.71
7.4.120.0240.00517.63
7.4.110.0240.00417.74
7.4.100.0270.00317.91
7.4.90.0190.00417.78
7.4.80.0200.00517.57
7.4.70.0190.00717.82
7.4.60.0210.00917.69
7.4.50.0230.00217.69
7.4.40.0180.00518.00
7.4.30.0190.00617.85
7.4.20.0190.00517.79
7.4.10.0210.00517.76
7.4.00.0240.00317.83
7.3.330.0240.00317.74
7.3.320.0180.00917.76
7.3.310.0200.00617.70
7.3.300.0260.00017.83
7.3.290.0280.00317.55
7.3.280.0260.00317.51
7.3.270.0230.00617.61
7.3.260.0200.00317.64
7.3.250.0200.00317.74
7.3.240.0170.00417.63
7.3.230.0160.00617.81
7.3.220.0160.00717.54
7.3.210.0190.00417.67
7.3.200.0180.00517.68
7.3.190.0110.01117.58
7.3.180.0160.00717.65
7.3.170.0180.00318.01
7.3.160.0190.00317.81
7.3.150.0190.00317.51
7.3.140.0170.00517.59
7.3.130.0180.00417.52
7.3.120.0160.00417.67
7.3.110.0190.00317.91
7.3.100.0160.00917.57
7.3.90.0200.00217.74
7.3.80.0190.01217.62
7.3.70.0180.00218.05
7.3.60.0150.00817.64
7.3.50.0190.00417.76
7.3.40.0140.00717.69
7.3.30.0190.00217.63
7.3.20.0200.00518.69
7.3.10.0140.00718.55
7.3.00.0190.00418.58
7.2.340.0130.00817.81
7.2.330.0200.00217.74
7.2.320.0180.00417.75
7.2.310.0170.00317.80
7.2.300.0170.00517.65
7.2.290.0180.00417.88
7.2.280.0200.00117.76
7.2.270.0160.00617.70
7.2.260.0170.00417.79
7.2.250.0120.01017.73
7.2.240.0160.00617.73
7.2.230.0180.00317.76
7.2.220.0110.01017.77
7.2.210.0210.00317.63
7.2.200.0210.00317.63
7.2.190.0210.00317.63
7.2.180.0170.00817.77
7.2.170.0200.00317.93
7.2.160.0170.00417.78
7.2.150.0130.01018.64
7.2.140.0210.00018.69
7.2.130.0120.00918.78
7.2.120.0160.00618.76
7.2.110.0190.00218.88
7.2.100.0150.00518.76
7.2.90.0200.00418.66
7.2.80.0170.00518.79
7.2.70.0210.00518.87
7.2.60.0160.00718.72
7.2.50.0170.00718.80
7.2.40.0200.00418.55
7.2.30.0160.00818.80
7.2.20.0200.00618.90
7.2.10.0100.01319.02
7.2.00.0080.00618.68
7.1.330.0150.00518.33
7.1.320.0160.00618.08
7.1.310.0200.00518.04
7.1.300.0220.00318.24
7.1.290.0140.00818.22
7.1.280.0200.00218.22
7.1.270.0130.01018.75
7.1.260.0170.00318.15
7.1.250.0150.00518.11
7.1.240.0170.00418.12
7.1.230.0200.00618.23
7.1.220.0250.00018.18
7.1.210.0180.00618.33
7.1.200.0160.00918.08
7.1.190.0190.00618.29
7.1.180.0210.00518.24
7.1.170.0170.00518.11
7.1.160.0180.00518.82
7.1.150.0160.00618.25
7.1.140.0160.00818.11
7.1.130.0230.00118.13
7.1.120.0140.00918.17
7.1.110.0130.00818.09
7.1.100.0210.00318.10
7.1.90.0190.00818.26
7.1.80.0170.00818.03
7.1.70.0200.00818.10
7.1.60.0160.00918.17
7.1.50.0170.00518.67
7.1.40.0170.00718.16
7.1.30.0190.00618.21
7.1.20.0170.00318.12
7.1.10.0160.00418.28
7.1.00.0130.00118.55
7.0.330.0160.00618.18
7.0.320.0180.00318.16
7.0.310.0180.00318.08
7.0.300.0100.01118.04
7.0.290.0190.00317.95
7.0.280.0200.00418.11
7.0.270.0180.00618.08
7.0.260.0190.00418.09
7.0.250.0160.00618.24
7.0.240.0160.00618.06
7.0.230.0260.00218.09
7.0.220.0190.00617.98
7.0.210.0160.00718.15
7.0.200.0180.00518.15
7.0.190.0180.00318.08
7.0.180.0170.00218.11
7.0.170.0170.00218.23
7.0.160.0190.00517.98
7.0.150.0190.00318.00
7.0.140.0150.00818.14
7.0.130.0190.00118.14
7.0.120.0190.00418.14
7.0.110.0180.00318.69
7.0.100.0080.00818.03
7.0.90.0130.00818.16
7.0.80.0120.00918.06
7.0.70.0140.00718.10
7.0.60.0110.00318.09
7.0.50.0110.00617.99
7.0.40.0140.00418.06
7.0.30.0110.00318.04
7.0.20.0200.00318.09
7.0.10.0170.00317.92
7.0.00.0190.00317.95
5.6.400.0150.00317.44
5.6.390.0150.00417.34
5.6.380.0160.00517.38
5.6.370.0170.00517.39
5.6.360.0100.01117.35
5.6.350.0170.00417.26
5.6.340.0150.00517.41
5.6.330.0130.00517.43
5.6.320.0130.00617.48
5.6.310.0170.00217.31
5.6.300.0170.00217.37
5.6.290.0130.00617.43
5.6.280.0170.00417.45
5.6.270.0200.00317.49
5.6.260.0200.00317.37
5.6.250.0160.00717.35
5.6.240.0120.01217.50
5.6.230.0170.00617.49
5.6.220.0180.00617.58
5.6.210.0180.00417.60
5.6.200.0140.00717.62
5.6.190.0180.00517.44
5.6.180.0200.00417.49
5.6.170.0200.00317.54
5.6.160.0240.00517.66
5.6.150.0180.00917.59
5.6.140.0220.00317.58
5.6.130.0200.00517.50
5.6.120.0190.00517.50
5.6.110.0170.00517.52
5.6.100.0180.00417.53
5.6.90.0160.00217.42
5.6.80.0110.00717.40
5.6.70.0160.00317.56
5.6.60.0140.00517.50
5.6.50.0140.00417.44
5.6.40.0130.00517.46
5.6.30.0150.00317.44
5.6.20.0130.00417.40
5.6.10.0140.00517.44
5.6.00.0170.00217.51
5.5.380.0120.00717.54
5.5.370.0180.00517.48
5.5.360.0160.00317.49
5.5.350.0110.00817.50
5.5.340.0130.00617.40
5.5.330.0160.00417.46
5.5.320.0150.00717.40
5.5.310.0190.00617.46
5.5.300.0220.00117.47
5.5.290.0150.01017.52
5.5.280.0150.01217.30
5.5.270.0180.00617.31
5.5.260.0220.00217.27
5.5.250.0190.00517.37
5.5.240.0180.00317.50
5.5.230.0190.00317.44
5.5.220.0130.00617.49
5.5.210.0110.00817.58
5.5.200.0160.00317.43
5.5.190.0150.00317.46
5.5.180.0130.00617.37
5.5.170.0090.00917.41
5.5.160.0150.00417.47
5.5.150.0170.00117.37
5.5.140.0140.00417.30
5.5.130.0150.00417.43
5.5.120.0160.00217.24
5.5.110.0130.00517.29
5.5.100.0180.00017.55
5.5.90.0160.00317.46
5.5.80.0190.00217.38
5.5.70.0120.00717.48
5.5.60.0130.00717.39
5.5.50.0150.00317.49
5.5.40.0150.00417.50
5.5.30.0140.00617.39
5.5.20.0180.00617.38
5.5.10.0130.00917.24
5.5.00.0120.00717.21
5.4.450.0120.00417.16
5.4.440.0140.00317.16
5.4.430.0120.00217.16
5.4.420.0140.00117.16
5.4.410.0110.00417.16
5.4.400.0130.00317.16
5.4.390.0160.00017.16
5.4.380.0160.00017.16
5.4.370.0110.00317.16
5.4.360.0130.00317.16
5.4.350.0180.00217.16
5.4.340.0110.00517.16
5.4.330.0150.00517.16
5.4.320.0130.00317.16
5.4.310.0130.00517.16
5.4.300.0090.00817.16
5.4.290.0130.00117.16
5.4.280.0070.00817.16
5.4.270.0130.00117.16
5.4.260.0140.00317.16
5.4.250.0160.00017.16
5.4.240.0140.00317.16
5.4.230.0130.00417.16
5.4.220.0120.00517.16
5.4.210.0120.00317.16
5.4.200.0150.00417.16
5.4.190.0180.00017.16
5.4.180.0120.00517.16
5.4.170.0140.00517.16
5.4.160.0130.00517.16
5.4.150.0140.00417.16
5.4.140.0130.00617.16
5.4.130.0130.00317.16
5.4.120.0100.00517.16
5.4.110.0140.00117.16
5.4.100.0140.00217.16
5.4.90.0150.00017.16
5.4.80.0110.00417.16
5.4.70.0090.00517.16
5.4.60.0060.00317.16
5.4.50.0090.00517.16
5.4.40.0080.00217.16
5.4.30.0090.00417.16
5.4.20.0060.00417.16
5.4.10.0090.00317.16
5.4.00.0100.00017.16
5.3.290.0100.00417.16
5.3.280.0100.00017.16
5.3.270.0130.00117.16
5.3.260.0070.00317.16
5.3.250.0050.00517.16
5.3.240.0090.00217.16
5.3.230.0040.00617.16
5.3.220.0080.00117.16
5.3.210.0140.00017.16
5.3.200.0040.00517.16
5.3.190.0100.00317.16
5.3.180.0060.00417.16
5.3.170.0050.00417.16
5.3.160.0090.00617.16
5.3.150.0090.00317.16
5.3.140.0090.00317.16
5.3.130.0120.00017.16
5.3.120.0100.00217.16
5.3.110.0160.00117.16
5.3.100.0130.00217.16
5.3.90.0070.00417.16
5.3.80.0080.00517.16
5.3.70.0080.00417.16
5.3.60.0090.00217.16
5.3.50.0020.01017.16
5.3.40.0050.00717.16
5.3.30.0040.00717.16
5.3.20.0050.00617.16
5.3.10.0070.00517.16
5.3.00.0090.00317.16

preferences:
46.2 ms | 401 KiB | 5 Q