3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'aa'; if(substr($str, 0, 3) == pack("CCC", array(0xaa, 0xbb, 0xcc)) { $str = substr($str, 3); }

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)
5.4.320.1800.04019.06
5.4.310.1570.03719.17
5.4.300.1600.03719.13
5.4.290.1630.04019.23
5.4.280.1730.04018.98
5.4.270.1900.04019.14
5.4.260.1670.03019.21
5.4.250.1730.03319.07
5.4.240.1770.04318.83
5.4.230.1830.04318.98
5.4.220.1700.04019.30
5.4.210.1970.03019.07
5.4.200.1700.03719.13
5.4.190.1900.04019.09
5.4.180.1830.03718.83
5.4.170.1900.03718.86
5.4.160.1600.03319.16
5.4.150.1730.03719.20
5.4.140.1800.04016.40
5.4.130.1770.04716.44
5.4.120.1730.03716.37
5.4.110.1900.03716.56
5.4.100.1730.03716.54
5.4.90.1900.03316.36
5.4.80.1970.04316.57
5.4.70.1970.04316.44
5.4.60.1970.04016.35
5.4.50.1830.04316.51
5.4.40.1770.04316.53
5.4.30.1700.04016.42
5.4.20.1800.04016.34
5.4.10.1670.03716.25
5.4.00.1930.03715.95
5.3.290.1900.03714.61
5.3.280.2000.03714.45
5.3.270.1530.03714.70
5.3.260.1730.04714.45
5.3.250.1600.03714.44
5.3.240.1830.04014.55
5.3.230.1600.04014.63
5.3.220.1670.03314.47
5.3.210.1670.03714.52
5.3.200.1700.03714.52
5.3.190.2030.03714.50
5.3.180.0830.04314.58
5.3.170.0070.03314.58
5.3.160.0000.04014.39
5.3.150.1470.04014.55
5.3.140.1770.03314.46
5.3.130.1670.04314.49
5.3.120.1770.04014.42
5.3.110.1970.04714.39
5.3.100.1730.04313.99
5.3.90.1530.03713.90
5.3.80.1770.04014.07
5.3.70.1430.03713.82
5.3.60.1930.03713.95
5.3.50.1600.04713.93
5.3.40.1130.04313.77
5.3.30.0070.03313.69
5.3.20.0030.03713.55
5.3.10.1370.05013.64
5.3.00.1800.04713.59
5.2.170.1500.04011.09
5.2.160.1570.03011.01
5.2.150.1470.03310.99
5.2.140.1500.03711.20
5.2.130.1630.03310.96
5.2.120.1430.03010.98
5.2.110.1430.03310.93
5.2.100.1570.02711.04
5.2.90.1530.03310.95
5.2.80.1600.03311.17
5.2.70.1100.03711.25
5.2.60.0100.02711.10
5.2.50.0070.06310.86
5.2.40.0100.03311.00
5.2.30.1030.03711.13
5.2.20.1330.03310.97
5.2.10.1400.03011.04
5.2.00.1300.03310.66
5.1.60.1100.0239.98
5.1.50.1330.0339.98
5.1.40.1070.0239.84
5.1.30.1230.02710.30
5.1.20.1330.02310.39
5.1.10.1230.0279.97
5.1.00.1270.02310.08
5.0.50.0570.0238.77
5.0.40.0670.0338.77
5.0.30.0770.0378.77
5.0.20.0770.0308.77
5.0.10.0600.0378.77
5.0.00.0600.0508.77
4.4.90.0570.0178.77
4.4.80.0570.0138.77
4.4.70.0530.0178.77
4.4.60.0630.0308.77
4.4.50.0600.0178.77
4.4.40.0670.0378.77
4.4.30.0670.0208.77
4.4.20.0670.0208.77
4.4.10.0670.0238.77
4.4.00.0570.0278.77
4.3.110.0630.0178.77
4.3.100.0570.0108.77
4.3.90.0700.0108.77
4.3.80.0700.0408.77
4.3.70.0630.0178.77
4.3.60.0630.0178.77
4.3.50.0600.0278.77
4.3.40.0700.0378.77
4.3.30.0330.0308.77
4.3.20.0330.0178.77
4.3.10.0330.0208.77
4.3.00.0300.0208.77

preferences:
146.76 ms | 939 KiB | 8 Q