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 $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.0140.00318.18
8.3.50.0080.01022.05
8.3.40.0070.00718.79
8.3.30.0130.00318.94
8.3.20.0030.00520.25
8.3.10.0070.00021.97
8.3.00.0090.00019.02
8.2.180.0140.00716.63
8.2.170.0120.00922.96
8.2.160.0100.00722.10
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0060.00319.77
8.2.110.0060.00319.45
8.2.100.0060.00617.91
8.2.90.0080.00019.34
8.2.80.0030.00517.97
8.2.70.0060.00317.63
8.2.60.0050.00317.93
8.2.50.0060.00318.10
8.2.40.0030.00718.34
8.2.30.0050.00218.12
8.2.20.0000.00717.80
8.2.10.0000.00818.15
8.2.00.0070.00017.71
8.1.280.0040.01825.92
8.1.270.0050.00319.02
8.1.260.0110.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00424.02
8.1.230.0070.00417.76
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0030.00517.25
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0000.00722.09
8.1.150.0030.00618.93
8.1.140.0040.00417.45
8.1.130.0030.00317.94
8.1.120.0000.00717.48
8.1.110.0030.00517.46
8.1.100.0050.00317.34
8.1.90.0040.00417.40
8.1.80.0050.00217.44
8.1.70.0000.00717.49
8.1.60.0040.00417.47
8.1.50.0030.00617.44
8.1.40.0050.00317.47
8.1.30.0000.00817.71
8.1.20.0040.00417.70
8.1.10.0000.00817.59
8.1.00.0040.00417.45
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.39
8.0.270.0040.00417.24
8.0.260.0040.00417.33
8.0.250.0030.00317.04
8.0.240.0030.00317.05
8.0.230.0040.00417.00
8.0.220.0040.00416.88
8.0.210.0000.00717.00
8.0.200.0030.00517.02
8.0.190.0050.00317.02
8.0.180.0050.00317.05
8.0.170.0000.00716.97
8.0.160.0030.00616.92
8.0.150.0000.00816.84
8.0.140.0050.00516.96
8.0.130.0030.00313.33
8.0.120.0080.00316.82
8.0.110.0000.00916.89
8.0.100.0030.00316.94
8.0.90.0000.00716.94
8.0.80.0070.01116.96
8.0.70.0040.00416.95
8.0.60.0030.00517.03
8.0.50.0070.00017.03
8.0.30.0110.01216.86
8.0.20.0060.01217.40
8.0.10.0050.00317.03
8.0.00.0090.00916.88
7.4.330.0000.00515.03
7.4.320.0060.00016.47
7.4.300.0030.00316.62
7.4.290.0070.00016.54
7.4.280.0080.00016.54
7.4.270.0000.00716.38
7.4.260.0030.00316.39
7.4.250.0000.00716.50
7.4.240.0020.00516.53
7.4.230.0070.00016.26
7.4.220.0090.00916.47
7.4.210.0030.01716.56
7.4.200.0050.00216.70
7.4.160.0100.00616.38
7.4.150.0140.00317.40
7.4.140.0110.01017.86
7.4.130.0040.01216.58
7.4.120.0080.01016.54
7.4.110.0120.00416.48
7.4.100.0120.00416.53
7.4.90.0120.00616.46
7.4.80.0040.01319.39
7.4.70.0120.01116.66
7.4.60.0040.01216.57
7.4.50.0040.00416.51
7.4.40.0110.01116.41
7.4.30.0100.01316.38
7.4.00.0030.01215.15
7.3.330.0050.00013.40
7.3.320.0050.00013.16
7.3.310.0080.00016.27
7.3.300.0070.00016.23
7.3.290.0070.01016.27
7.3.280.0050.01416.33
7.3.270.0030.01517.40
7.3.260.0120.00616.41
7.3.250.0160.00916.52
7.3.240.0100.00716.64
7.3.230.0000.01816.39
7.3.210.0030.01616.29
7.3.200.0120.01219.39
7.3.190.0030.01316.50
7.3.180.0070.01716.49
7.3.170.0140.00416.64
7.3.160.0070.01016.34
7.2.330.0040.02116.79
7.2.320.0090.00916.68
7.2.310.0150.00316.66
7.2.300.0090.00916.73
7.2.290.0070.01316.76
7.2.120.0030.00716.82
7.2.110.0060.00316.82
7.2.100.0060.00616.73
7.2.90.0100.00716.64
7.2.80.0070.00716.81
7.2.70.0030.01017.06
7.2.60.0100.00317.04
7.2.50.0120.00317.05
7.2.40.0030.00916.91
7.2.30.0000.00917.10
7.2.20.0100.00317.00
7.2.10.0070.00716.68
7.2.00.0000.01717.03
7.1.240.0030.01315.87
7.1.230.0080.00415.77
7.1.220.0090.00315.61
7.1.210.0030.01015.55
7.1.200.0080.01015.64
7.1.190.0030.01315.95
7.1.180.0040.01115.98
7.1.170.0030.00915.84
7.1.160.0030.00915.82
7.1.150.0130.00015.92
7.1.140.0090.00615.77
7.1.130.0050.00315.88
7.1.120.0080.00015.93
7.1.110.0060.00915.62
7.1.100.0030.01215.71
7.1.90.0090.00615.70
7.1.80.0030.00915.55
7.1.70.0040.00816.48
7.1.60.0030.01017.65
7.1.50.0030.01216.35
7.1.40.0100.00315.76
7.1.30.0080.00315.85
7.1.20.0060.00615.86
7.1.10.0060.00615.83
7.1.00.0070.04019.19
7.0.320.0040.00815.49
7.0.310.0000.01215.39
7.0.300.0040.01215.25
7.0.290.0070.00715.34
7.0.280.0040.00715.51
7.0.270.0060.00915.20
7.0.260.0000.01115.45
7.0.250.0030.00715.12
7.0.240.0040.00415.38
7.0.230.0030.01015.46
7.0.220.0040.00415.17
7.0.210.0000.00915.36
7.0.200.0050.00616.12
7.0.190.0000.00815.55
7.0.180.0060.00915.42
7.0.170.0030.01215.45
7.0.160.0030.00615.52
7.0.150.0030.00715.18
7.0.140.0030.03518.67
7.0.130.0030.01015.42
7.0.120.0070.00715.14
7.0.110.0070.00715.34
7.0.100.0110.00415.40
7.0.90.0060.00615.29
7.0.80.0070.00715.61
7.0.70.0080.00315.49
7.0.60.0050.04217.57
7.0.50.0050.03616.65
7.0.40.0080.02316.88
7.0.30.0130.02216.96
7.0.20.0190.03616.86
7.0.10.0050.04416.71
7.0.00.0070.04216.82
5.6.380.0000.01314.63
5.6.370.0080.00014.64
5.6.360.0060.01014.56
5.6.350.0000.01014.46
5.6.340.0040.01114.60
5.6.330.0040.01114.68
5.6.320.0040.01114.39
5.6.310.0040.00714.43
5.6.300.0070.00414.46
5.6.290.0100.00614.63
5.6.280.0050.03817.77
5.6.270.0030.00914.67
5.6.260.0030.00714.68
5.6.250.0100.00614.67
5.6.240.0030.01014.32
5.6.230.0090.00614.41
5.6.220.0080.00414.44
5.6.210.0060.02617.46
5.6.200.0050.02616.16
5.6.190.0030.03517.31
5.6.180.0180.02217.36
5.6.170.0190.03917.36
5.6.160.0100.04217.42
5.6.150.0080.04016.26
5.6.140.0040.03416.13
5.6.130.0070.04316.23
5.6.120.0070.02317.70
5.6.110.0090.02417.63
5.6.100.0030.04317.77
5.6.90.0070.03417.66
5.6.80.0130.03817.35
5.6.70.0000.01514.30
5.6.60.0060.00914.25
5.6.50.0060.00614.03
5.6.40.0040.01114.29
5.6.30.0100.00314.08
5.6.20.0060.00614.54
5.6.10.0070.00414.34
5.6.00.0110.00314.15
5.5.380.0080.00011.32
5.5.370.0050.00311.35
5.5.360.0070.00311.27
5.5.350.0080.04015.82
5.5.340.0030.04714.73
5.5.330.0020.05515.75
5.5.320.0170.04015.77
5.5.310.0120.04015.79
5.5.300.0020.03114.63
5.5.290.0030.03814.61
5.5.280.0050.02015.97
5.5.270.0090.04016.12
5.5.260.0030.04516.00
5.5.250.0120.03415.99
5.5.240.1920.02215.77
5.5.230.0070.00311.27
5.5.220.0060.00611.27
5.5.210.0040.00811.27
5.5.200.0030.00711.27
5.5.190.0040.00711.27
5.5.180.0040.00711.27
5.5.170.0100.00314.17
5.5.160.0070.00311.27
5.5.150.0070.00311.27
5.5.140.0060.00611.27
5.5.130.0040.00811.31
5.5.120.0070.00411.27
5.5.110.0030.00711.27
5.5.100.0060.00611.27
5.5.90.0100.00011.27
5.5.80.0070.00311.27
5.5.70.0080.00311.27
5.5.60.0040.00711.29
5.5.50.0070.00411.27
5.5.40.0000.00711.27
5.5.30.0000.01211.27
5.5.20.0000.00811.27
5.5.10.0040.00711.27
5.5.00.0080.00311.27
5.4.450.0330.03115.42
5.4.440.0370.02715.44
5.4.430.0080.03015.36
5.4.420.0030.03315.34
5.4.410.0070.03015.34
5.4.400.0100.02815.16
5.4.390.0100.03115.03
5.4.380.0130.03814.97
5.4.370.0180.03314.99
5.4.360.0120.03315.02
5.4.350.0110.03314.89
5.4.340.0190.02614.92
5.4.330.0030.00711.27
5.4.320.0130.03514.90
5.4.310.0120.03714.88
5.4.300.0120.03614.99
5.4.290.0100.03114.94
5.4.280.0170.02814.96
5.4.270.0150.03014.96
5.4.260.0170.02514.96
5.4.250.0200.02314.90
5.4.240.0130.03114.95
5.4.230.0120.03014.89
5.4.220.0150.03115.01
5.4.210.0080.03614.96
5.4.200.0120.02713.87
5.4.190.0150.02714.96
5.4.180.0100.03215.00
5.4.170.0170.03414.99
5.4.160.0200.02815.01
5.4.150.0220.02214.93
5.4.140.0050.03713.74
5.4.130.0080.03613.74
5.4.120.0080.03213.77
5.4.110.0100.02913.79
5.4.100.0170.03413.71
5.4.90.0100.03813.70
5.4.80.0060.03713.65
5.4.70.0120.03713.74
5.4.60.0200.02013.78
5.4.50.0150.02913.75
5.4.40.0100.03313.68
5.4.30.0130.03013.73
5.4.20.0200.02113.72
5.4.10.0090.03413.70
5.4.00.0080.03213.49
5.3.290.0150.02712.94
5.3.280.0130.03012.90
5.3.270.0120.03012.94
5.3.260.0120.03212.91
5.3.250.0130.02712.99
5.3.240.0150.03112.95
5.3.230.0080.03512.93
5.3.220.0140.02712.93
5.3.210.0100.03012.96
5.3.200.0080.03212.91
5.3.190.0080.03512.88
5.3.180.0110.03212.87
5.3.170.0140.02312.90
5.3.160.0170.03212.90
5.3.150.0120.03212.88
5.3.140.0150.02512.92
5.3.130.0160.02512.92
5.3.120.0130.03012.90
5.3.110.0080.04312.87
5.3.100.0100.03712.65
5.3.90.0130.03012.69
5.3.80.0100.03312.63
5.3.70.0120.02712.61
5.3.60.0130.03012.62
5.3.50.0070.03512.60
5.3.40.0150.02712.56
5.3.30.0150.02712.54
5.3.20.0080.03312.43
5.3.10.0120.03312.45
5.3.00.0130.03312.50
5.2.170.0090.02311.18
5.2.160.0060.02611.22
5.2.150.0100.02211.19
5.2.140.0080.02411.18
5.2.130.0110.02411.17
5.2.120.0090.03111.20
5.2.110.0100.02311.18
5.2.100.0080.02311.14
5.2.90.0110.02311.17
5.2.80.0120.02811.14
5.2.70.0070.02611.20
5.2.60.0150.02611.13
5.2.50.0120.02711.14
5.2.40.0160.01711.12
5.2.30.0050.02911.15
5.2.20.0070.02411.08
5.2.10.0080.02511.09
5.2.00.0070.02511.00
5.1.60.0040.02210.62
5.1.50.0090.01810.67
5.1.40.0100.01810.64
5.1.30.0050.02410.87
5.1.20.0020.02510.83
5.1.10.0080.02110.66
5.1.00.0070.02210.68
5.0.50.0050.0209.92
5.0.40.0080.0159.89
5.0.30.0070.0229.75
5.0.20.0080.0179.74
5.0.10.0080.0159.75
5.0.00.0050.0239.75
4.4.90.0030.0148.60
4.4.80.0050.0138.54
4.4.70.0050.0158.57
4.4.60.0100.0088.58
4.4.50.0030.0168.59
4.4.40.0050.0208.57
4.4.30.0050.0138.60
4.4.20.0030.0188.60
4.4.10.0060.0108.57
4.4.00.0020.0218.59
4.3.110.0100.0108.54
4.3.100.0060.0108.54
4.3.90.0080.0158.60
4.3.80.0060.0168.59
4.3.70.0030.0158.54
4.3.60.0050.0168.58
4.3.50.0030.0168.56
4.3.40.0030.0208.55
4.3.30.0050.0137.93
4.3.20.0020.0167.90
4.3.10.0020.0147.89
4.3.00.0080.00911.87

preferences:
42.04 ms | 401 KiB | 5 Q