3v4l.org

run code in 300+ PHP versions simultaneously
<?php $descSpec = array( array('pipe','r'), // stdin array('pipe','w'), // stdout array('pipe','w') // stderr ); $proc = proc_open('bash', $descSpec, $pipes,'/tmp',array()); if(!is_resource($proc)){ throw new Exception("Could not open bash process"); } $stdin = &$pipes[0]; $stdout = &$pipes[1]; $stderr = &$pipes[2]; stream_set_blocking($stdout,0); stream_set_blocking($stderr,0); fwrite($stdin, "pwd\n"); fflush($stdin); $write = null; $except = null; $stdoutArr = array($stdout); $rv = stream_select($stdoutArr,$write,$except,1); $strIn = stream_get_line($stdout,4096); var_export(array('streamSelect_returnVal'=>$rv,'stdout_strRead'=>$strIn));

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.0070.00716.48
8.3.50.0100.00916.36
8.3.40.0040.01118.75
8.3.30.0070.01418.79
8.3.20.0060.00318.85
8.3.10.0000.00818.90
8.3.00.0030.00717.75
8.2.180.0160.00316.88
8.2.170.0140.00022.96
8.2.160.0140.00018.79
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00020.87
8.2.110.0000.00919.31
8.2.100.0070.00417.72
8.2.90.0040.00419.23
8.2.80.0030.00618.09
8.2.70.0040.00417.63
8.2.60.0000.00817.91
8.2.50.0000.00817.80
8.2.40.0080.00019.48
8.2.30.0000.01017.75
8.2.20.0000.01017.54
8.2.10.0040.00417.63
8.2.00.0000.00817.75
8.1.280.0040.01125.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.62
8.1.230.0040.00817.83
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00417.13
8.1.180.0000.00821.98
8.1.170.0040.00417.62
8.1.160.0030.00319.07
8.1.150.0040.00418.45
8.1.140.0040.00417.44
8.1.130.0000.00717.45
8.1.120.0060.00317.34
8.1.110.0000.00717.42
8.1.100.0040.00417.27
8.1.90.0040.00417.30
8.1.80.0070.00017.50
8.1.70.0000.00717.34
8.1.60.0040.00417.49
8.1.50.0030.00617.46
8.1.40.0030.00617.44
8.1.30.0000.00817.69
8.1.20.0000.00817.62
8.1.10.0000.00817.57
8.1.00.0080.00017.51
8.0.300.0000.00718.77
8.0.290.0000.00916.63
8.0.280.0000.00718.63
8.0.270.0040.00417.20
8.0.260.0070.00016.83
8.0.250.0040.00416.88
8.0.240.0030.00317.00
8.0.230.0030.00516.93
8.0.220.0000.00716.95
8.0.210.0070.00016.93
8.0.200.0070.00016.82
8.0.190.0050.00317.01
8.0.180.0050.00316.96
8.0.170.0030.00516.88
8.0.160.0000.00716.90
8.0.150.0060.00316.85
8.0.140.0110.00016.71
8.0.130.0000.00513.38
8.0.120.0040.00416.87
8.0.110.0040.00416.78
8.0.100.0040.00416.83
8.0.90.0020.00516.93
8.0.80.0090.00616.86
8.0.70.0040.00416.80
8.0.60.0030.00516.71
8.0.50.0050.00316.96
8.0.30.0150.00317.08
8.0.20.0090.01016.98
8.0.10.0040.00416.98
8.0.00.0100.01216.90
7.4.330.0000.00513.05
7.4.320.0000.00616.51
7.4.300.0030.00316.59
7.4.290.0080.00016.61
7.4.280.0000.00716.65
7.4.270.0040.00416.51
7.4.260.0000.00613.35
7.4.250.0030.00516.60
7.4.240.0030.00316.61
7.4.230.0080.00016.71
7.4.220.0060.01316.48
7.4.210.0060.01116.48
7.4.200.0030.00316.41
7.4.190.0040.00416.78
7.4.160.0150.00716.53
7.4.150.0060.01516.41
7.4.140.0180.00317.86
7.4.130.0100.01216.56
7.4.120.0120.00616.48
7.4.110.0140.00616.56
7.4.100.0100.00716.59
7.4.90.0040.01416.50
7.4.80.0060.00919.39
7.4.70.0090.00916.54
7.4.60.0130.00416.63
7.4.50.0030.00616.51
7.4.40.0110.00716.21
7.4.30.0130.00916.71
7.4.00.0100.00715.18
7.3.330.0030.00313.05
7.3.320.0030.00613.15
7.3.310.0060.00316.11
7.3.300.0030.00316.17
7.3.290.0070.00816.25
7.3.280.0060.00916.30
7.3.270.0030.01516.48
7.3.260.0140.00316.47
7.3.240.0110.00616.44
7.3.230.0060.01516.37
7.3.210.0030.01316.37
7.3.200.0100.00716.50
7.3.190.0130.00316.58
7.3.180.0090.00616.23
7.3.170.0040.01316.39
7.3.160.0060.00916.25
7.3.120.0070.01014.88
7.3.10.0090.00416.46
7.3.00.0070.00616.76
7.2.330.0070.01016.73
7.2.320.0070.01016.79
7.2.310.0100.00716.73
7.2.300.0060.01116.69
7.2.290.0070.01016.70
7.2.130.0080.00516.99
7.2.120.0020.01016.95
7.2.110.0040.01116.84
7.2.100.0060.00716.85
7.2.90.0040.00816.88
7.2.80.0020.01116.84
7.2.70.0070.00617.08
7.2.60.0050.00317.03
7.2.50.0060.00917.02
7.2.40.0030.01316.93
7.2.30.0020.01016.75
7.2.20.0090.00617.01
7.2.10.0060.00816.78
7.2.00.0020.00916.86
7.1.250.0100.00315.75
7.1.100.0000.01318.12
7.1.70.0030.00617.18
7.1.60.0160.00719.25
7.1.50.0040.01117.17
7.1.00.0070.07322.35
7.0.200.0060.00316.88
7.0.140.0070.07022.02
7.0.120.0030.07722.01
7.0.60.0070.03720.10
7.0.50.0070.04017.82
7.0.40.0030.05320.14
7.0.30.0230.03720.17
7.0.20.0330.07020.09
7.0.10.0130.06320.09
7.0.00.0170.07720.16
5.6.280.0030.07721.10
5.6.210.0000.07320.66
5.6.200.0070.06018.24
5.6.190.0030.05720.42
5.6.180.0300.06020.27
5.6.170.0430.06720.54
5.6.160.0030.06320.71
5.6.150.0000.04718.20
5.6.140.0100.07718.14
5.6.130.0100.08018.24
5.6.120.0070.08721.00
5.6.110.0100.08020.96
5.6.100.0100.03720.99
5.6.90.0100.08320.88
5.6.80.0070.03720.40
5.5.350.0200.03020.48
5.5.340.0170.04018.03
5.5.330.0030.04320.48
5.5.320.0400.07320.13
5.5.310.0370.06020.31
5.5.300.0000.08718.03
5.5.290.0070.05718.02
5.5.280.0130.07320.87
5.5.270.0070.05020.79
5.5.260.0170.07720.77
5.5.250.0230.07020.77
5.5.240.0000.03320.24
5.4.450.0130.06719.41
5.4.440.0030.06019.41
5.4.430.0130.06719.44
5.4.420.0070.04019.40
5.4.410.0130.06019.02
5.4.400.0070.04719.14
5.4.390.0030.05319.14
5.4.380.0070.06719.17
5.4.370.0130.06018.94
5.4.360.0070.06719.08
5.4.350.0000.07018.82
5.4.340.0200.06319.14
5.4.320.0100.03318.78
5.4.310.0000.04319.16
5.4.300.0030.07319.17
5.4.290.0070.06719.17
5.4.280.0030.07319.11
5.4.270.0030.06719.14
5.4.260.0100.04719.08
5.4.250.0100.03319.17
5.4.240.0100.07319.16
5.4.230.0030.07019.14
5.4.220.0070.04719.13
5.4.210.0070.06718.80
5.4.200.0030.04718.81
5.4.190.0030.04319.07
5.4.180.0030.04019.14
5.4.170.0030.08018.91
5.4.160.0100.06319.07
5.4.150.0070.05718.78
5.4.140.0170.05316.38
5.4.130.0070.06316.38
5.4.120.0100.05716.30
5.4.110.0070.06016.57
5.4.100.0030.08016.25
5.4.90.0070.07716.34
5.4.80.0070.07016.30
5.4.70.0070.07016.29
5.4.60.0100.06316.35
5.4.50.0030.07016.32
5.4.40.0100.04316.18
5.4.30.0130.07016.28
5.4.20.0070.04016.42
5.4.10.0070.04716.42
5.4.00.0070.03715.65
5.3.290.0170.05014.55
5.3.280.0130.07714.40
5.3.270.0030.06714.54
5.3.260.0100.03714.49
5.3.250.0100.03014.54
5.3.240.0100.07014.54
5.3.230.0100.07714.39
5.3.220.0100.07314.52
5.3.210.0070.04714.39
5.3.200.0130.06314.47
5.3.190.0070.07714.52
5.3.180.0100.05014.50
5.3.170.0070.04314.55
5.3.160.0200.06314.56
5.3.150.0070.06314.41
5.3.140.0030.05014.49
5.3.130.0000.09014.47
5.3.120.0030.06014.57
5.3.110.0130.06714.48
5.3.100.0070.03713.93
5.3.90.0000.04313.96
5.3.80.0030.04714.00
5.3.70.0030.04014.00
5.3.60.0070.04713.96
5.3.50.0000.04713.90
5.3.40.0070.03313.93
5.3.30.0030.04013.85
5.3.20.0030.04713.63
5.3.10.0070.04713.59
5.3.00.0000.08013.58
5.2.170.0030.03011.06
5.2.160.0100.03311.13
5.2.150.0000.03311.10
5.2.140.0030.04311.24
5.2.130.0070.03711.02
5.2.120.0000.03311.02
5.2.110.0070.06711.11
5.2.100.0100.05711.28
5.2.90.0030.04311.02
5.2.80.0030.03311.01
5.2.70.0070.03710.96
5.2.60.0070.06011.22
5.2.50.0070.02710.98
5.2.40.0000.03711.00
5.2.30.0030.06010.95
5.2.20.0030.06010.79
5.2.10.0030.03310.88
5.2.00.0030.02710.78
5.1.60.0000.0609.99
5.1.50.0000.06010.02
5.1.40.0070.0509.90
5.1.30.0000.04310.42
5.1.20.0030.03010.41
5.1.10.0000.0279.99
5.1.00.0100.02010.16
5.0.50.0000.0238.64
5.0.40.0000.0208.47
5.0.30.0030.0278.32
5.0.20.0030.0178.27
5.0.10.0000.0208.15
5.0.00.0000.0308.23
4.4.90.0030.0337.71
4.4.80.0030.0237.71
4.4.70.0030.0207.71
4.4.60.0000.0377.71
4.4.50.0070.0207.71
4.4.40.0070.0437.71
4.4.30.0030.0277.71
4.4.20.0000.0177.71
4.4.10.0000.0177.71
4.4.00.0000.0277.71
4.3.110.0000.0177.71
4.3.100.0000.0137.71
4.3.90.0000.0177.71
4.3.80.0030.0207.71
4.3.70.0000.0137.71
4.3.60.0000.0137.71
4.3.50.0000.0137.71
4.3.40.0000.0237.71
4.3.30.0000.0137.71
4.3.20.0030.0137.71
4.3.10.0000.0207.71
4.3.00.0000.0137.71

preferences:
43.73 ms | 401 KiB | 5 Q