3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php my_version_compare("2.5.1", "2.5.2"); # => -1 (smaller) my_version_compare("2.5.2", "2.5.2"); # => 0 (equal) my_version_compare("2.5.5", "2.5.2"); # => 1 (bigger) my_version_compare("2.5.11", "2.5.2"); # => 1 (bigger, eleven is bigger than two) function my_version_compare($version1, $version2) { var_dump(floatval($version1) >= $version2); }

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.1.70.0060.00617.23
7.1.60.0070.01719.46
7.1.50.0210.00716.94
7.1.00.0070.07322.28
7.0.200.0030.00716.66
7.0.140.0100.06722.03
7.0.60.0130.08019.93
7.0.50.0100.04317.81
7.0.40.0070.06317.82
7.0.30.0170.06017.75
7.0.20.0030.05317.77
7.0.10.0130.03317.71
7.0.00.0030.05717.73
5.6.210.0130.06320.51
5.6.200.0000.05018.24
5.6.190.0100.04718.27
5.6.180.0100.07718.16
5.6.170.0070.04018.16
5.6.160.0000.07318.23
5.6.150.0000.06718.29
5.6.140.0100.07718.16
5.6.130.0000.09018.18
5.6.120.0100.05318.14
5.6.110.0030.05018.17
5.6.100.0070.07318.20
5.6.90.0070.05018.16
5.6.80.0170.06317.67
5.6.70.0030.07717.66
5.6.60.0100.06017.66
5.6.50.0070.05717.56
5.6.40.0070.04017.50
5.6.30.0070.07717.66
5.6.20.0100.07317.53
5.6.10.0100.06017.57
5.6.00.0170.05017.62
5.5.350.4530.03720.32
5.5.340.0170.05317.96
5.5.330.0130.07018.02
5.5.320.0100.08018.09
5.5.310.0030.04317.98
5.5.300.0030.08717.98
5.5.290.0070.04718.01
5.5.280.0100.03717.98
5.5.270.0070.04317.99
5.5.260.0170.06317.94
5.5.250.0070.08317.78
5.5.240.0000.08017.42
5.5.230.0070.05317.32
5.5.220.0070.07717.33
5.5.210.0100.04717.36
5.5.200.0030.07317.31
5.5.190.0030.08017.34
5.5.180.0070.07317.40
5.5.160.0030.08317.30
5.5.150.0230.03317.30
5.5.140.0130.07317.49
5.5.130.0000.05717.39
5.5.120.0030.04017.40
5.5.110.0030.04017.30
5.5.100.0030.08017.23
5.5.90.0100.05017.16
5.5.80.0000.04717.20
5.5.70.0070.04317.22
5.5.60.0100.07717.33
5.5.50.0070.04717.25
5.5.40.0000.05317.22
5.5.30.0030.07717.18
5.5.20.0100.07717.21
5.5.10.0130.04317.23
5.5.00.0170.06017.18
5.4.450.0030.08019.28
5.4.440.0030.04319.44
5.4.430.0100.07319.27
5.4.420.0030.06719.39
5.4.410.0130.06019.27
5.4.400.0100.07719.27
5.4.390.0030.05019.03
5.4.380.0100.07319.10
5.4.370.0070.04319.09
5.4.360.0100.07319.27
5.4.350.0030.04019.05
5.4.340.0030.04319.07
5.4.320.0100.07319.12
5.4.310.0070.07018.98
5.4.300.0170.07019.00
5.4.290.0170.04319.11
5.4.280.0030.07719.03
5.4.270.0030.04019.13
5.4.260.0000.04319.11
5.4.250.0070.08319.15
5.4.240.0000.05719.09
5.4.230.0030.06719.05
5.4.220.0170.05318.98
5.4.210.0070.03719.02
5.4.200.0100.03319.13
5.4.190.0000.08018.89
5.4.180.0000.05019.00
5.4.170.0100.07319.04
5.4.160.0100.05019.01
5.4.150.0070.07019.01
5.4.140.0170.06716.41
5.4.130.0070.05716.43
5.4.120.0070.07016.38
5.4.110.0030.03716.48
5.4.100.0070.03316.39
5.4.90.0070.04316.42
5.4.80.0000.04016.21
5.4.70.0070.04716.33
5.4.60.0100.03716.45
5.4.50.0000.03716.52
5.4.40.0000.03716.60
5.4.30.0030.04016.40
5.4.20.0000.03716.45
5.4.10.0030.06016.21
5.4.00.0000.03715.87
5.3.290.0030.08014.64
5.3.280.0100.04014.59
5.3.270.0070.04714.58
5.3.260.0030.05014.61
5.3.250.0100.05314.55
5.3.240.0000.08014.60
5.3.230.0130.06314.67
5.3.220.0170.06314.59
5.3.210.0030.05314.59
5.3.200.0000.08714.66
5.3.190.0000.04014.61
5.3.180.0100.03014.59
5.3.170.0030.06314.77
5.3.160.0070.03314.61
5.3.150.0000.04314.57
5.3.140.0030.03714.58
5.3.130.0030.07714.64
5.3.120.0030.03714.64
5.3.110.0030.03714.58
5.3.100.0000.04014.03
5.3.90.0000.06013.96
5.3.80.0070.04013.90
5.3.70.0030.04014.03
5.3.60.0030.03314.05
5.3.50.0030.03713.96
5.3.40.0000.04013.99
5.3.30.0070.03713.92
5.3.20.0000.03713.72
5.3.10.0000.03713.86
5.3.00.0000.03713.68
5.2.170.0070.03311.17
5.2.160.0030.02711.20
5.2.150.0000.03311.11
5.2.140.0000.03011.00
5.2.130.0000.03011.13
5.2.120.0070.02311.16
5.2.110.0030.02711.11
5.2.100.0000.03011.32
5.2.90.0030.03711.00
5.2.80.0000.03011.15
5.2.70.0000.03011.13
5.2.60.0000.03011.03
5.2.50.0030.03010.98
5.2.40.0100.02011.03
5.2.30.0000.03011.00
5.2.20.0000.03011.16
5.2.10.0100.02010.89
5.2.00.0030.02710.56
5.1.60.0070.0209.83
5.1.50.0070.01710.04
5.1.40.0030.02710.04
5.1.30.0070.03710.37
5.1.20.0070.02310.25
5.1.10.0030.0239.93
5.1.00.0000.0279.90
5.0.50.0000.0308.49
5.0.40.0030.0408.39
5.0.30.0030.0608.27
5.0.20.0100.0378.26
5.0.10.0000.0508.09
5.0.00.0070.0608.11
4.4.90.0030.0137.66
4.4.80.0000.0177.66
4.4.70.0000.0177.66
4.4.60.0000.0177.66
4.4.50.0070.0107.66
4.4.40.0000.0237.66
4.4.30.0070.0137.66
4.4.20.0000.0177.66
4.4.10.0000.0177.66
4.4.00.0030.0437.66
4.3.110.0000.0377.66
4.3.100.0070.0337.66
4.3.90.0000.0277.66
4.3.80.0000.0507.66
4.3.70.0000.0177.66
4.3.60.0000.0307.66
4.3.50.0000.0177.66
4.3.40.0030.0277.66
4.3.30.0000.0377.66
4.3.20.0000.0307.66
4.3.10.0000.0407.66
4.3.00.0000.0337.66