3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function endswith($haystack, $needle) { $length = strlen($needle); if ($length == 0) { return true; } return (substr($haystack, -$length) === $needle); } if (version_compare(phpversion(), '5.1.0', '>')) { var_dump(endswith("abcdefg", "abc")); }
based on qGYBH

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0060.00916.23
7.3.00.0080.00415.98
7.2.130.0070.01016.29
7.2.120.0080.00416.56
7.2.110.0050.01116.67
7.2.100.0180.00416.61
7.2.90.0120.00916.66
7.2.80.0100.00816.72
7.2.70.0120.01216.58
7.2.60.0110.00916.69
7.2.50.0210.01116.68
7.2.40.0120.00916.21
7.2.30.0190.01216.47
7.2.20.0130.00616.37
7.2.10.0100.01016.55
7.2.00.0040.01818.05
7.1.250.0050.00515.57
7.1.100.0000.00917.98
7.1.70.0030.00617.20
7.1.60.0100.01419.50
7.1.50.0060.01616.85
7.1.00.0030.07722.43
7.0.200.0040.00416.56
7.0.140.0000.07722.13
7.0.60.0170.07319.95
7.0.50.0030.08017.88
7.0.40.0030.05020.11
7.0.30.0430.07020.09
7.0.20.0470.06320.12
7.0.10.0200.06020.16
7.0.00.0130.08720.30
5.6.280.0030.07320.89
5.6.210.0100.07720.66
5.6.200.0100.05318.15
5.6.190.0030.08020.58
5.6.180.0100.04720.65
5.6.170.0530.07020.48
5.6.160.0070.05020.62
5.6.150.0030.04018.18
5.6.140.0030.06318.15
5.6.130.0000.04318.23
5.6.120.0070.04321.03
5.6.110.0030.09021.01
5.6.100.0100.08021.09
5.6.90.0070.06721.13
5.6.80.0100.08020.48
5.6.70.0100.05720.53
5.5.350.0170.04320.45
5.5.340.0000.08317.98
5.5.330.0100.08020.21
5.5.320.0200.08020.26
5.5.310.0230.04020.30
5.5.300.0030.04017.98
5.5.290.0100.05318.07
5.5.280.0100.08020.78
5.5.270.0030.08320.65
5.5.260.0070.08320.97
5.5.250.0130.08020.63
5.5.240.0130.07720.15
5.4.450.0830.04019.16
5.4.440.0700.05719.30
5.4.430.0430.05719.60
5.4.420.0170.05719.55
5.4.410.0830.05719.42
5.4.400.0300.05018.91
5.4.390.0200.06018.50
5.4.380.0330.05018.73
5.4.370.0300.05018.46
5.4.360.0170.06018.73
5.4.350.0270.05318.74
5.4.340.0300.05018.56
5.4.320.0230.05318.83
5.4.310.0300.05318.82
5.4.300.0400.05318.71
5.4.290.0330.07018.78
5.4.280.0200.05718.55
5.4.270.0230.07718.63
5.4.260.0130.06318.82
5.4.250.0270.05718.57
5.4.240.0300.06718.69
5.4.230.0300.05718.49
5.4.220.0270.05318.70
5.4.210.0170.06018.71
5.4.200.0230.07316.59
5.4.190.0300.04718.48
5.4.180.0200.06718.59
5.4.170.0370.06018.71
5.4.160.0200.06318.70
5.4.150.0200.05718.63
5.4.140.0300.05716.33
5.4.130.0300.04716.23
5.4.120.0300.04016.30
5.4.110.0170.06016.23
5.4.100.0300.04316.44
5.4.90.0230.06016.45
5.4.80.0130.05316.30
5.4.70.0330.03716.16
5.4.60.0400.04716.30
5.4.50.0270.06016.13
5.4.40.0230.06316.38
5.4.30.0200.05016.23
5.4.20.0130.06016.28
5.4.10.0330.03716.15
5.4.00.0270.06015.61
5.3.290.0270.07314.77
5.3.280.0270.05314.63
5.3.270.0330.04314.73
5.3.260.0200.05714.82
5.3.250.0200.05014.63
5.3.240.0230.05314.63
5.3.230.0270.05314.64
5.3.220.0300.07314.77
5.3.210.0270.05014.69
5.3.200.0300.04314.60
5.3.190.0200.05314.68
5.3.180.0200.05314.73
5.3.170.0230.05314.60
5.3.160.0300.04714.52
5.3.150.0200.05714.64
5.3.140.0330.05014.59
5.3.130.0230.05314.72
5.3.120.0300.05014.56
5.3.110.0130.06314.71
5.3.100.0230.05714.00
5.3.90.0270.04714.05
5.3.80.0270.06714.13
5.3.70.0270.04714.23
5.3.60.0170.05714.11
5.3.50.0200.05314.06
5.3.40.0270.05014.04
5.3.30.0300.04313.95
5.3.20.0270.05313.80
5.3.10.0370.04013.70
5.3.00.0270.05713.75
5.2.170.0200.04011.17
5.2.160.0100.04711.10
5.2.150.0130.04311.14
5.2.140.0100.05011.17
5.2.130.0130.05011.24
5.2.120.0170.04011.13
5.2.110.0200.03711.08
5.2.100.0230.03311.23
5.2.90.0170.03711.30
5.2.80.0130.04711.13
5.2.70.0130.06011.13
5.2.60.0170.05711.09
5.2.50.0200.04011.12
5.2.40.0170.04010.97
5.2.30.0200.04010.99
5.2.20.0300.02710.98
5.2.10.0200.03710.90
5.2.00.0100.05010.84
5.1.60.0100.03710.02
5.1.50.0130.03710.20
5.1.40.0170.0339.95
5.1.30.0130.04010.34
5.1.20.0130.03710.43
5.1.10.0130.04010.19
5.1.00.0200.03010.19
5.0.50.0070.0308.68
5.0.40.0030.0308.55
5.0.30.0170.0338.18
5.0.20.0100.0278.16
5.0.10.0030.0338.30
5.0.00.0100.0438.17
4.4.90.0170.0136.00
4.4.80.0130.0135.93
4.4.70.0070.0235.90
4.4.60.0100.0235.90
4.4.50.0070.0276.00
4.4.40.0070.0375.90
4.4.30.0070.0235.93
4.4.20.0100.0205.96
4.4.10.0100.0206.02
4.4.00.0070.0375.95
4.3.110.0070.0275.87
4.3.100.0130.0175.82
4.3.90.0130.0135.80
4.3.80.0070.0375.83
4.3.70.0130.0205.84
4.3.60.0070.0205.81
4.3.50.0070.0235.84
4.3.40.0170.0275.86
4.3.30.0070.0204.55
4.3.20.0070.0204.56
4.3.10.0030.0234.52
4.3.00.0130.0237.11