3v4l.org

run code in 300+ PHP versions simultaneously
<?php $modes = [ 'r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+', 'r+b', 'wb', 'w+b', 'ab', 'a+b', 'xb', 'x+b', 'cb', 'c+b', 'r+t', 'wt', 'w+t', 'at', 'a+t', 'xt', 'x+t', 'ct', 'c+t']; foreach($modes as $mode) { $stream = fopen('php://memory', $mode); $stats = stream_get_meta_data($stream); echo $mode.': '.$stats['mode'].PHP_EOL; }

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.0150.00318.43
8.3.50.0070.01121.92
8.3.40.0070.00718.67
8.3.30.0120.00319.04
8.3.20.0030.01020.34
8.3.10.0040.00421.69
8.3.00.0000.01119.02
8.2.180.0130.01016.75
8.2.170.0070.00722.96
8.2.160.0040.01122.09
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0080.00019.66
8.2.110.0030.00619.39
8.2.100.0070.00418.03
8.2.90.0040.00419.16
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0000.00818.05
8.2.50.0050.00318.10
8.2.40.0000.01018.28
8.2.30.0000.00718.19
8.2.20.0040.00417.81
8.2.10.0040.00418.05
8.2.00.0080.00017.75
8.1.280.0060.01225.92
8.1.270.0000.00818.86
8.1.260.0030.01026.35
8.1.250.0080.00028.09
8.1.240.0040.00419.21
8.1.230.0090.00317.89
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00717.23
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0060.00318.64
8.1.160.0070.00022.07
8.1.150.0060.00318.84
8.1.140.0040.00417.34
8.1.130.0030.00317.82
8.1.120.0000.00717.48
8.1.110.0000.00717.37
8.1.100.0000.00717.54
8.1.90.0030.00617.36
8.1.80.0020.00517.32
8.1.70.0050.00317.45
8.1.60.0060.00317.61
8.1.50.0030.00517.52
8.1.40.0040.00417.49
8.1.30.0030.00617.61
8.1.20.0060.00317.70
8.1.10.0050.00317.50
8.1.00.0030.00617.55
8.0.300.0040.00418.77
8.0.290.0040.00416.62
8.0.280.0030.00618.50
8.0.270.0030.00317.38
8.0.260.0040.00417.22
8.0.250.0030.00317.05
8.0.240.0070.00017.00
8.0.230.0030.00316.99
8.0.220.0000.00716.95
8.0.210.0030.00316.95
8.0.200.0070.00016.89
8.0.190.0040.00416.91
8.0.180.0040.00416.82
8.0.170.0000.00716.88
8.0.160.0050.00216.98
8.0.150.0000.00716.90
8.0.140.0050.00516.97
8.0.130.0090.00013.42
8.0.120.0000.01016.91
8.0.110.0040.00416.91
8.0.100.0000.00716.98
8.0.90.0050.00216.84
8.0.80.0160.00616.96
8.0.70.0050.00216.92
8.0.60.0030.00516.84
8.0.50.0040.00416.83
8.0.30.0100.01317.20
8.0.20.0110.00917.40
8.0.10.0070.00017.14
8.0.00.0110.00916.71
7.4.330.0000.00515.03
7.4.320.0060.00016.47
7.4.300.0000.00616.66
7.4.290.0030.00316.51
7.4.280.0000.00816.64
7.4.270.0030.00316.52
7.4.260.0040.00416.59
7.4.250.0000.00916.64
7.4.240.0020.00516.53
7.4.230.0030.00316.32
7.4.220.0090.00916.57
7.4.210.0070.01316.55
7.4.200.0040.00416.60
7.4.160.0040.01216.56
7.4.150.0080.01117.40
7.4.140.0110.01117.86
7.4.130.0110.00916.45
7.4.120.0090.00916.52
7.4.110.0030.01416.41
7.4.100.0000.01716.32
7.4.90.0100.00716.67
7.4.80.0090.00919.39
7.4.70.0060.01516.65
7.4.60.0130.00416.56
7.4.50.0040.00416.48
7.4.40.0210.00016.35
7.4.30.0140.00316.46
7.4.00.0050.00515.14
7.3.330.0000.00513.13
7.3.320.0000.00613.41
7.3.310.0040.00416.35
7.3.300.0060.00016.27
7.3.290.0090.00716.33
7.3.280.0080.01216.29
7.3.270.0090.00917.40
7.3.260.0160.00816.29
7.3.250.0130.01316.39
7.3.240.0140.00716.62
7.3.230.0120.01216.39
7.3.210.0180.00016.29
7.3.200.0030.01519.39
7.3.190.0120.00416.36
7.3.180.0120.01216.57
7.3.170.0030.01416.35
7.3.160.0130.01016.52
7.2.330.0030.01516.63
7.2.320.0150.00616.79
7.2.310.0090.01316.71
7.2.300.0150.00816.71
7.2.290.0080.01116.57
7.2.60.0100.00316.73
7.2.00.0000.01219.33
7.1.200.0030.00715.84
7.1.100.0040.00718.21
7.1.70.0090.00017.19
7.1.60.0030.02019.46
7.1.50.0030.00917.02
7.1.00.0000.08022.58
7.0.200.0060.00316.98
7.0.140.0000.04722.22
7.0.60.0030.04719.94
7.0.50.0070.04717.83
7.0.40.0100.08320.02
7.0.30.0400.06020.13
7.0.20.0230.07720.21
7.0.10.0370.06720.02
7.0.00.0070.04320.01
5.6.280.0070.06320.93
5.6.210.0000.07720.61
5.6.200.0100.04718.21
5.6.190.0200.07320.41
5.6.180.0200.06720.44
5.6.170.0270.07720.45
5.6.160.0030.04320.38
5.6.150.0070.06318.12
5.6.140.0030.03718.18
5.6.130.0100.05018.11
5.6.120.0100.07021.05
5.6.110.0100.05721.02
5.6.100.0030.08020.98
5.6.90.0070.06021.01
5.6.80.0100.07320.40
5.6.70.4370.04020.27
5.5.350.0100.08020.46
5.5.340.0000.06317.95
5.5.330.0070.04020.25
5.5.320.3300.04020.50
5.5.310.0200.08020.29
5.5.300.0000.07017.88
5.5.290.0030.06017.94
5.5.280.0170.07320.96
5.5.270.0030.08320.64
5.5.260.0070.08020.86
5.5.250.0130.07320.69
5.5.240.0200.04320.23
5.4.450.0500.07319.38
5.4.440.0530.06019.47
5.4.430.0100.05319.65
5.4.420.0170.05019.36
5.4.410.0200.04319.21
5.4.400.0200.04319.05
5.4.390.0430.04718.72
5.4.380.0330.05018.56
5.4.370.0270.05318.58
5.4.360.0200.05318.64
5.4.350.0300.05318.58
5.4.340.0270.06018.79
5.4.320.0330.06018.55
5.4.310.0230.05318.72
5.4.300.0370.07718.63
5.4.290.0330.05318.77
5.4.280.0270.05318.66
5.4.270.0130.06018.52
5.4.260.0130.06018.63
5.4.250.0300.07018.68
5.4.240.0230.07718.70
5.4.230.0230.05718.63
5.4.220.0370.04318.73
5.4.210.0130.05718.46
5.4.200.0130.06316.64
5.4.190.0230.05318.70
5.4.180.0330.05318.68
5.4.170.0230.06318.51
5.4.160.0200.05018.49
5.4.150.0300.07018.66
5.4.140.0270.04316.28
5.4.130.0200.05016.29
5.4.120.0300.04716.18
5.4.110.0270.06016.17
5.4.100.0230.05016.29
5.4.90.0170.05016.18
5.4.80.0170.05316.29
5.4.70.0230.05016.21
5.4.60.0200.05716.25
5.4.50.0300.05016.20
5.4.40.0170.06016.24
5.4.30.0070.06016.32
5.4.20.0300.04316.03
5.4.10.0130.05716.22
5.4.00.0200.05015.71
5.3.290.0230.05014.56
5.3.280.0370.05014.52
5.3.270.0200.07014.52
5.3.260.0230.06014.53
5.3.250.0130.06314.62
5.3.240.0170.06714.61
5.3.230.0230.05714.57
5.3.220.0130.06014.46
5.3.210.0200.05714.48
5.3.200.0200.05714.46
5.3.190.0170.05714.52
5.3.180.0170.07314.49
5.3.170.0270.06314.65
5.3.160.0270.06014.49
5.3.150.0200.07014.52
5.3.140.0200.04714.50
5.3.130.0230.07314.46
5.3.120.0170.06014.51
5.3.110.0170.06714.64
5.3.100.0200.06314.04
5.3.90.0230.05714.00
5.3.80.0130.06314.10
5.3.70.0100.06014.11
5.3.60.0100.06013.96
5.3.50.0200.05013.91
5.3.40.0270.04313.85
5.3.30.0170.05014.00
5.3.20.0300.04713.66
5.3.10.0200.04713.75
5.3.00.0230.04713.55
5.2.170.0200.03711.30
5.2.160.0230.04011.30
5.2.150.0100.05011.21
5.2.140.0100.05011.20
5.2.130.0130.04011.08
5.2.120.0300.03011.13
5.2.110.0230.04711.01
5.2.100.0200.05311.09
5.2.90.0070.05011.05
5.2.80.0230.04311.13
5.2.70.0130.04311.15
5.2.60.0100.05010.95
5.2.50.0330.04010.96
5.2.40.0130.04710.95
5.2.30.0070.05711.01
5.2.20.0100.05710.88
5.2.10.0170.03710.96
5.2.00.0070.04710.73
5.1.60.0100.03710.02
5.1.50.0070.04010.09
5.1.40.0200.04010.10
5.1.30.0170.03310.38
5.1.20.0100.04010.39
5.1.10.0030.04710.13
5.1.00.0170.03710.09
5.0.50.0100.0278.61
5.0.40.0170.0338.46
5.0.30.0100.0438.21
5.0.20.0170.0208.21
5.0.10.0130.0278.34
5.0.00.0070.0478.19
4.4.90.0100.0305.83
4.4.80.0030.0275.88
4.4.70.0070.0205.86
4.4.60.0070.0275.92
4.4.50.0030.0275.93
4.4.40.0100.0305.87
4.4.30.0130.0175.82
4.4.20.0000.0275.96
4.4.10.0000.0305.96
4.4.00.0030.0375.91
4.3.110.0100.0205.83
4.3.100.0030.0275.77
4.3.90.0070.0205.78
4.3.80.0030.0375.78
4.3.70.0070.0205.79
4.3.60.0070.0235.79
4.3.50.0000.0305.79
4.3.40.0030.0375.75
4.3.30.0070.0204.56
4.3.20.0030.0234.55
4.3.10.0000.0274.55
4.3.00.0070.02312.46

preferences:
43.05 ms | 401 KiB | 5 Q