3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* $a = '0xf'; $b = '15'; $c = 15; var_dump('Vars', $a, $b, $c); var_dump('EQ', $a == $b, $a == $c, $b == $c); */ test('pie', function($a){return $a;}); test('pie', function($a){return $a == 15;}); test('pie', function($a){return $a === 15;}); test('pie', function($a){return (int)$a;}); function test($label, $lambda){ static $a = ['hex' => '0xf', 'str' => '15', 'int' => 15]; echo $label; foreach($a AS $k=>$v) { echo " $k => "; var_export($lambda($v)); } echo "\n"; }
based on pg3nF

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.0rc40.0190.00598.97
7.3.0rc30.0160.00316.64
7.3.0beta10.0030.00312.65
7.3.0alpha10.0030.00612.56
7.2.60.0040.01116.98
7.2.00.0030.01019.31
7.1.200.0030.01015.79
7.1.100.0030.01018.21
7.1.70.0040.00417.00
7.1.60.0060.01619.40
7.1.50.0100.01316.77
7.1.00.0030.07722.28
7.0.200.0000.01116.81
7.0.140.0130.06322.12
7.0.60.0130.06319.96
7.0.50.0100.08017.72
7.0.40.0000.04719.96
7.0.30.0400.06020.09
7.0.20.0300.07720.13
7.0.10.0100.08020.16
7.0.00.0170.05720.19
5.6.280.0000.07721.02
5.6.210.0230.07320.57
5.6.200.0070.07018.20
5.6.190.0100.04720.55
5.6.180.0270.07720.56
5.6.170.0200.06020.54
5.6.160.0030.08320.46
5.6.150.0200.07018.14
5.6.140.0070.04018.28
5.6.130.0030.04318.15
5.6.120.0100.04721.05
5.6.110.0200.06721.10
5.6.100.0030.06720.98
5.6.90.0230.06321.01
5.6.80.0100.07720.52
5.5.350.0030.07020.39
5.5.340.0130.07318.04
5.5.330.0170.07020.38
5.5.320.0470.07320.33
5.5.310.0330.08020.39
5.5.300.0030.04717.95
5.5.290.0070.03717.98
5.5.280.0200.07720.76
5.5.270.0100.07020.76
5.5.260.0100.06720.73
5.5.250.0030.08020.80
5.5.240.0300.06320.20
5.4.450.0100.05019.50
5.4.440.0330.05019.17
5.4.430.0130.04319.37
5.4.420.0430.04019.37
5.4.410.0330.03719.29
5.4.400.0400.03718.98
5.4.390.0200.04019.31
5.4.380.0100.06718.64
5.4.370.0100.05318.53
5.4.360.0130.05318.48
5.4.350.0100.06018.48
5.4.340.0270.04018.68
5.4.320.0090.04812.51
5.4.310.0070.03712.50
5.4.300.0020.04012.51
5.4.290.0070.03812.51
5.4.280.0090.03312.40
5.4.270.0050.03812.40
5.4.260.0090.03812.40
5.4.250.0010.04112.40
5.4.240.0080.03412.40
5.4.230.0090.04112.39
5.4.220.0060.03912.40
5.4.210.0070.03812.39
5.4.200.0050.03812.39
5.4.190.0130.03412.39
5.4.180.0070.03812.39
5.4.170.0080.03312.40
5.4.160.0030.03812.39
5.4.150.0070.03412.39
5.4.140.0040.04212.07
5.4.130.0040.03912.06
5.4.120.0110.03312.02
5.4.110.0110.03012.02
5.4.100.0040.03712.02
5.4.90.0090.03512.02
5.4.80.0070.03612.02
5.4.70.0070.03512.02
5.4.60.0060.03612.02
5.4.50.0040.04312.01
5.4.40.0030.04612.00
5.4.30.0060.03512.00
5.4.20.0050.04312.00
5.4.10.0040.03612.00
5.4.00.0030.03811.49
5.3.290.0170.04312.80
5.3.280.0080.03612.71
5.3.270.0040.04012.73
5.3.260.0050.04212.72
5.3.250.0030.03912.72
5.3.240.0060.04212.72
5.3.230.0050.03812.70
5.3.220.0080.04212.68
5.3.210.0050.04212.68
5.3.200.0050.03712.68
5.3.190.0050.04112.68
5.3.180.0070.03512.67
5.3.170.0070.03912.67
5.3.160.0060.03712.67
5.3.150.0060.04212.68
5.3.140.0040.04112.66
5.3.130.0060.04212.66
5.3.120.0050.04512.66
5.3.110.0090.03612.66
5.3.100.0080.03412.13
5.3.90.0060.03612.11
5.3.80.0090.03712.10
5.3.70.0070.03712.11
5.3.60.0070.04112.10
5.3.50.0100.04612.05
5.3.40.0070.03712.04
5.3.30.0060.03411.99
5.3.20.0090.03911.78
5.3.10.0040.03611.74
5.3.00.0060.03511.73
5.2.170.0060.0299.18
5.2.160.0030.0319.18
5.2.150.0080.0319.18
5.2.140.0060.0349.18
5.2.130.0040.0309.14
5.2.120.0040.0309.14
5.2.110.0060.0369.14
5.2.100.0050.0309.14
5.2.90.0060.0289.14
5.2.80.0070.0319.14
5.2.70.0080.0319.14
5.2.60.0030.0329.09
5.2.50.0050.0309.06
5.2.40.0080.0269.04
5.2.30.0040.0319.01
5.2.20.0030.0339.00
5.2.10.0070.0258.93
5.2.00.0050.0328.78
5.1.60.0070.0238.07
5.1.50.0060.0228.06
5.1.40.0030.0308.05
5.1.30.0050.0258.40
5.1.20.0050.0298.42
5.1.10.0060.0238.14
5.1.00.0050.0258.14
5.0.50.0020.0266.62
5.0.40.0040.0186.48
5.0.30.0030.0316.29
5.0.20.0020.0216.27
5.0.10.0030.0196.24
5.0.00.0020.0326.23
4.4.90.0020.0154.77
4.4.80.0020.0154.76
4.4.70.0040.0144.75
4.4.60.0030.0154.75
4.4.50.0010.0174.77
4.4.40.0020.0284.71
4.4.30.0030.0154.76
4.4.20.0030.0194.84
4.4.10.0030.0144.85
4.4.00.0040.0294.76
4.3.110.0010.0174.67
4.3.100.0020.0154.67
4.3.90.0030.0154.64
4.3.80.0020.0244.58
4.3.70.0050.0114.63
4.3.60.0010.0164.63
4.3.50.0020.0164.63
4.3.40.0030.0274.54
4.3.30.0040.0183.29
4.3.20.0010.0163.26
4.3.10.0020.0153.22
4.3.00.0100.01315.92