3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(ticks=2); function tick_handler() { echo "tick_handler() called\n"; } register_tick_function('tick_handler'); $a = 1; tick_handler(); if ($a > 0) { $a += 2; tick_handler(); print($a); tick_handler(); } tick_handler(); ?>

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.2.60.0030.01016.97
7.2.00.0000.01419.55
7.1.200.0060.01215.41
7.1.100.0040.00717.91
7.1.70.0040.00417.03
7.1.60.0140.01019.30
7.1.50.0040.01816.71
7.1.00.0030.07322.48
7.0.200.0050.00516.59
7.0.140.0000.07322.09
7.0.120.0070.04322.03
7.0.60.0000.07320.02
7.0.50.0030.04317.82
7.0.40.0000.04720.14
7.0.30.0230.04320.09
7.0.20.0300.08020.23
7.0.10.0230.08720.06
7.0.00.0130.08020.12
5.6.280.0000.07720.77
5.6.210.0130.06320.67
5.6.200.0030.06318.13
5.6.190.0070.09020.39
5.6.180.0430.04320.46
5.6.170.0230.04020.62
5.6.160.0100.05020.39
5.6.150.0100.04718.23
5.6.140.0170.07718.21
5.6.130.0130.07318.21
5.6.120.0070.04320.98
5.6.110.0030.04321.11
5.6.100.0030.07720.96
5.6.90.0030.07721.03
5.6.80.0070.08020.51
5.5.350.0370.07020.40
5.5.340.0170.07017.97
5.5.330.0070.04720.28
5.5.320.0130.07320.21
5.5.310.0300.06320.32
5.5.300.0130.05317.91
5.5.290.0070.08318.05
5.5.280.0000.04320.87
5.5.270.0100.05020.87
5.5.260.0000.04320.97
5.5.250.0100.03320.66
5.5.240.0100.06320.03
5.4.450.0030.04019.29
5.4.440.0000.04319.47
5.4.430.0030.04319.53
5.4.420.0030.05019.30
5.4.410.0070.03319.08
5.4.400.0030.04019.01
5.4.390.0070.08019.08
5.4.380.0000.04318.87
5.4.370.0100.05318.87
5.4.360.0100.07719.14
5.4.350.0200.06719.20
5.4.340.0030.05718.89
5.4.320.0100.07319.01
5.4.310.0030.04319.01
5.4.300.0030.04018.86
5.4.290.0170.07318.85
5.4.280.0000.07718.86
5.4.270.0000.04719.14
5.4.260.0070.07019.14
5.4.250.0100.07019.07
5.4.240.0070.05018.97
5.4.230.0030.05318.91
5.4.220.0030.07318.85
5.4.210.0100.03319.15
5.4.200.0030.04718.84
5.4.190.0030.04019.13
5.4.180.0200.06318.93
5.4.170.0100.05718.91
5.4.160.0130.03319.19
5.4.150.0100.08018.96
5.4.140.0100.06716.35
5.4.130.0070.04716.50
5.4.120.0070.04316.32
5.4.110.0000.05716.27
5.4.100.0170.06316.54
5.4.90.0130.03316.38
5.4.80.0130.06316.36
5.4.70.0030.03716.32
5.4.60.0100.07016.41
5.4.50.0000.06716.25
5.4.40.0030.08016.40
5.4.30.0100.07016.32
5.4.20.0130.06316.40
5.4.10.0030.05016.48
5.4.00.0100.07315.84
5.3.290.0070.03714.66
5.3.280.0070.07714.73
5.3.270.0070.07714.62
5.3.260.0100.07014.75
5.3.250.0100.06014.62
5.3.240.0030.05714.62
5.3.230.0070.05314.65
5.3.220.0170.06714.58
5.3.210.0100.04714.61
5.3.200.0000.05314.58
5.3.190.0170.03714.61
5.3.180.0070.07714.71
5.3.170.0130.03314.46
5.3.160.0100.06014.59
5.3.150.0070.04714.60
5.3.140.0100.05314.57
5.3.130.0070.05714.62
5.3.120.0070.07714.55
5.3.110.0100.03714.71
5.3.100.0170.06014.05
5.3.90.0100.05714.07
5.3.80.0030.08313.97
5.3.70.0100.07014.06
5.3.60.0070.04014.00
5.3.50.0100.07314.11
5.3.40.0100.07314.00
5.3.30.0130.07013.92
5.3.20.0070.07013.69
5.3.10.0030.05013.69
5.3.00.0070.05313.79
5.2.170.0170.05011.15
5.2.160.0000.06711.20
5.2.150.0070.03711.11
5.2.140.0070.06311.13
5.2.130.0000.04711.03
5.2.120.0000.05011.10
5.2.110.0100.05711.09
5.2.100.0030.03311.02
5.2.90.0030.06011.25
5.2.80.0100.04711.09
5.2.70.0000.03711.09
5.2.60.0200.02011.09
5.2.50.0070.04710.97
5.2.40.0070.05010.99
5.2.30.0030.03311.13
5.2.20.0030.05710.95
5.2.10.0030.04010.90
5.2.00.0070.02710.77
5.1.60.0070.0539.97
5.1.50.0000.04710.14
5.1.40.0030.04710.02
5.1.30.0100.04710.33
5.1.20.0100.02310.23
5.1.10.0030.04710.20
5.1.00.0100.0239.97
5.0.50.0130.0338.51
5.0.40.0070.0338.38
5.0.30.0000.0438.18
5.0.20.0030.0308.22
5.0.10.0070.0478.23
5.0.00.0070.0638.06
4.4.90.0000.0308.05
4.4.80.0000.0408.05
4.4.70.0030.0308.05
4.4.60.0000.0278.05
4.4.50.0000.0408.05
4.4.40.0070.0478.05
4.4.30.0030.0378.05
4.4.20.0000.0378.05
4.4.10.0070.0308.05
4.4.00.0000.0578.05
4.3.110.0000.0208.05
4.3.100.0030.0338.05
4.3.90.0100.0308.05
4.3.80.0000.0508.05
4.3.70.0030.0378.05
4.3.60.0000.0408.05
4.3.50.0000.0338.05
4.3.40.0070.0508.05
4.3.30.0000.0378.05
4.3.20.0030.0378.05
4.3.10.0000.0378.05
4.3.00.0030.0378.05