3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "foobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisoutfoobarbizbazbuztestingthisout"; echo memory_get_usage() . "\n"; $c = mb_substr($a, 0, strlen($a) - 1); echo memory_get_usage() . "\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)
7.4.10.0060.01215.06
7.4.00.0030.01415.09
7.3.130.0100.01015.01
7.3.120.0110.00714.80
7.3.110.0100.01014.82
7.3.100.0030.01215.08
7.3.90.0060.01014.54
7.3.80.0040.00814.78
7.3.70.0030.00614.77
7.3.60.0070.00714.87
7.3.50.0000.00914.79
7.3.40.0120.00614.52
7.3.30.0030.01314.39
7.3.20.0060.00916.54
7.3.10.0090.00316.72
7.3.00.0000.00916.48
7.2.260.0000.01914.95
7.2.250.0070.00715.18
7.2.240.0030.01214.73
7.2.230.0090.00615.31
7.2.220.0070.01015.07
7.2.210.0030.01214.99
7.2.200.0030.01314.94
7.2.190.0110.00314.95
7.2.180.0030.00715.10
7.2.170.0060.00315.20
7.2.160.0070.00414.88
7.2.150.0120.00616.96
7.2.140.0040.01216.97
7.2.130.0030.00916.79
7.2.120.0060.00917.02
7.2.110.0070.00716.82
7.2.100.0070.00716.82
7.2.90.0030.01416.94
7.2.80.0000.01416.66
7.2.70.0130.00316.71
7.2.60.0030.01316.95
7.2.50.0070.00716.82
7.2.40.0060.00616.62
7.2.30.0060.00617.15
7.2.20.0110.00416.93
7.2.10.0040.01116.73
7.2.00.0030.01016.99
7.1.330.0040.01115.73
7.1.320.0070.00715.62
7.1.310.0000.00915.99
7.1.300.0000.00815.70
7.1.290.0000.01315.75
7.1.280.0030.00915.45
7.1.270.0120.00015.79
7.1.260.0000.01415.53
7.1.250.0090.00315.48
7.1.240.0030.00615.87
7.1.230.0100.00715.59
7.1.220.0090.00015.75
7.1.210.0080.00415.65
7.1.200.0030.00615.84
7.1.190.0030.01315.88
7.1.180.0000.01515.86
7.1.170.0050.00515.99
7.1.160.0060.00615.90
7.1.150.0070.00715.75
7.1.140.0110.00415.68
7.1.130.0030.00915.66
7.1.120.0110.00415.74
7.1.110.0030.00815.75
7.1.100.0070.00715.98
7.1.90.0030.00615.77
7.1.80.0070.01015.82
7.1.70.0020.01116.24
7.1.60.0030.01417.66
7.1.50.0020.01216.15
7.1.40.0110.00015.93
7.1.30.0000.01215.89
7.1.20.0070.00415.69
7.1.10.0050.00515.95
7.1.00.0030.02119.09
7.0.330.0030.00715.35
7.0.320.0080.00415.32
7.0.310.0070.00415.37
7.0.300.0000.01115.32
7.0.290.0030.00915.38
7.0.280.0000.01115.34
7.0.270.0000.01415.39
7.0.260.0040.00715.29
7.0.250.0100.00315.42
7.0.240.0060.00915.23
7.0.230.0030.00715.52
7.0.220.0070.00715.69
7.0.210.0070.00715.54
7.0.200.0050.00715.93
7.0.190.0000.01315.25
7.0.180.0100.00315.45
7.0.170.0040.00415.24
7.0.160.0040.00815.49
7.0.150.0040.00415.41
7.0.140.0070.03518.73
7.0.130.0070.01015.48
7.0.120.0030.02218.74
7.0.110.0000.04117.70
7.0.100.0080.02917.62
7.0.90.0070.03817.71
7.0.80.0030.02917.66
7.0.70.0030.04517.49
7.0.60.0070.04317.74
7.0.50.0080.04218.01
7.0.40.0050.04316.72
7.0.30.0050.04816.81
7.0.20.0100.04316.90
7.0.10.0030.04716.85
7.0.00.0100.04316.94
5.6.400.0090.00014.59
5.6.390.0030.01014.25
5.6.380.0030.00914.58
5.6.370.0090.00314.23
5.6.360.0030.00614.28
5.6.350.0050.00514.09
5.6.340.0030.01014.44
5.6.330.0080.00814.40
5.6.320.0070.00414.36
5.6.310.0090.00314.39
5.6.300.0090.00314.14
5.6.290.0090.00614.27
5.6.280.0090.03517.67
5.6.270.0070.01014.47
5.6.260.0060.00614.44
5.6.250.0020.03017.42
5.6.240.0070.03417.54
5.6.230.0090.04117.44
5.6.220.0080.04117.72
5.6.210.0080.04317.53
5.6.200.0100.04317.74
5.6.190.0070.02917.61
5.6.180.0110.04317.71
5.6.170.0070.04217.92
5.6.160.0080.03517.74
5.6.150.0090.02517.55
5.6.140.0160.02317.68
5.6.130.0090.03317.79
5.6.120.0040.04917.75
5.6.110.0110.04117.75
5.6.100.0050.03717.66
5.6.90.0050.03417.76
5.6.80.0020.03717.22
5.6.70.0090.02117.41
5.6.60.0000.02917.26
5.6.50.0070.02317.39
5.6.40.0050.02517.31
5.6.30.0070.02017.28
5.6.20.0080.04417.17
5.6.10.0080.04317.47
5.6.00.0030.02817.37
5.5.380.0050.04317.31
5.5.370.0080.02717.32
5.5.360.0060.03817.43
5.5.350.0100.04017.45
5.5.340.0070.04617.63
5.5.330.0080.04217.57
5.5.320.0050.04717.67
5.5.310.0080.04217.67
5.5.300.0090.03517.60
5.5.290.0060.04617.55
5.5.280.0080.02317.58
5.5.270.0050.04617.53
5.5.260.0070.04017.54
5.5.250.0000.03017.32
5.5.240.0070.02617.32
5.5.230.0060.02317.26
5.5.220.0120.02517.27
5.5.210.0080.02517.24
5.5.200.0070.02017.11
5.5.190.0040.02617.11
5.5.180.0080.02517.28
5.5.170.0100.00714.28
5.5.160.0060.03617.13
5.5.150.0030.04617.13
5.5.140.0070.02917.13
5.5.130.0070.03717.42
5.5.120.0070.04217.16
5.5.110.0050.02317.01
5.5.100.0040.02217.09
5.5.90.0050.02217.09
5.5.80.0110.02617.22
5.5.70.0050.02817.21
5.5.60.0110.03517.24
5.5.50.0030.02517.10
5.5.40.0020.02617.08
5.5.30.0020.02717.29
5.5.20.0100.01717.19
5.5.10.0050.02017.20
5.5.00.0030.02316.96
5.4.450.0070.04315.07
5.4.440.0030.02415.38
5.4.430.0080.04015.17
5.4.420.0060.04515.28
5.4.410.0030.02515.11
5.4.400.0080.02514.97
5.4.390.0060.02915.02
5.4.380.0030.02315.06
5.4.370.0070.02015.14
5.4.360.0050.02015.07
5.4.350.0060.03115.07
5.4.340.0030.02515.01
5.4.330.0070.00710.78
5.4.320.0060.02215.06
5.4.310.0070.01514.95
5.4.300.0050.03014.94
5.4.290.0060.03915.07
5.4.280.0020.02414.92
5.4.270.0100.02315.12
5.4.260.0040.03014.89
5.4.250.0060.03815.07
5.4.240.0020.02415.02
5.4.230.0050.01814.91
5.4.220.0110.01515.03
5.4.210.0020.02415.07
5.4.200.0020.02315.11
5.4.190.0070.01815.01
5.4.180.0050.02214.97
5.4.170.0040.02215.06
5.4.160.0020.02214.97
5.4.150.0000.02514.89
5.4.140.0050.02013.60
5.4.130.0020.02113.62
5.4.120.0000.03413.62
5.4.110.0050.02113.86
5.4.100.0030.02213.62
5.4.90.0010.02113.58
5.4.80.0050.01713.55
5.4.70.0030.02013.56
5.4.60.0050.02113.60
5.4.50.0020.02013.62
5.4.40.0030.02213.59
5.4.30.0050.02513.51
5.4.20.0020.02113.55
5.4.10.0060.03513.70
5.4.00.0090.03613.35
5.3.290.0020.02112.54
5.3.280.0050.03312.29
5.3.270.0020.02212.51
5.3.260.0040.02712.60
5.3.250.0030.02112.48
5.3.240.0040.02012.43
5.3.230.0000.02312.34
5.3.220.0050.02412.42
5.3.210.0020.02712.39
5.3.200.0050.03112.51
5.3.190.0050.01712.44
5.3.180.0080.02312.36
5.3.170.0030.02012.46
5.3.160.0040.02212.46
5.3.150.0030.02212.52
5.3.140.0070.02212.34
5.3.130.0000.02512.46
5.3.120.0050.02212.44
5.3.110.0050.03312.48
5.3.100.0080.03612.05
5.3.90.0070.03612.19
5.3.80.0070.03511.96
5.3.70.0030.04112.08
5.3.60.0030.03712.17
5.3.50.0050.04012.16
5.3.40.0050.04011.99
5.3.30.0070.03512.04
5.3.20.0100.03711.92
5.3.10.0040.02411.80
5.3.00.0110.03511.96
5.2.170.0070.06011.03
5.2.160.0200.05011.30
5.2.150.0100.05711.07
5.2.140.0070.06311.29
5.2.130.0070.06011.00
5.2.120.0070.03011.00
5.2.110.0030.06311.02
5.2.100.0130.05311.02
5.2.90.0000.05311.04
5.2.80.0000.06711.00
5.2.70.0070.06311.05
5.2.60.0070.05711.07
5.2.50.0030.06310.81
5.2.40.0000.06311.15
5.2.30.0070.04310.89
5.2.20.0030.05010.98
5.2.10.0170.04010.98
5.2.00.0070.03310.71
5.1.60.0000.05710.16
5.1.50.0130.03010.00
5.1.40.0100.0409.95
5.1.30.0000.06010.55
5.1.20.0000.03310.25
5.1.10.0030.0579.98
5.1.00.0170.04010.00
5.0.50.0030.0408.60
5.0.40.0030.0408.42
5.0.30.0030.0638.27
5.0.20.0000.0478.45
5.0.10.0030.0278.13
5.0.00.0130.0478.12
4.4.90.0030.0278.07
4.4.80.0070.0208.07
4.4.70.0000.0238.07
4.4.60.0070.0308.07
4.4.50.0000.0378.07
4.4.40.0030.0408.07
4.4.30.0000.0338.07
4.4.20.0070.0278.07
4.4.10.0000.0378.07
4.4.00.0000.0538.07
4.3.110.0000.0378.07
4.3.100.0000.0378.07
4.3.90.0030.0338.07
4.3.80.0000.0538.07
4.3.70.0000.0378.07
4.3.60.0000.0378.07
4.3.50.0070.0178.07
4.3.40.0030.0438.07
4.3.30.0070.0278.07
4.3.20.0000.0338.07
4.3.10.0000.0378.07
4.3.00.0000.0338.07

preferences:
42.29 ms | 401 KiB | 5 Q