3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a($a) { print "in a: $a\n"; $b = function($b) { print "in b: $b"; }; return $b; } $a = a("foo"); $a("bar");

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.00.0080.00416.62
7.2.130.0110.00017.04
7.2.120.0060.00617.05
7.2.110.0070.00716.56
7.2.100.0080.00816.79
7.2.90.0030.01316.79
7.2.80.0110.00416.99
7.2.70.0090.00316.88
7.2.60.0100.00016.97
7.2.50.0100.00317.10
7.2.40.0040.00717.01
7.2.30.0030.00617.14
7.2.20.0120.00416.56
7.2.10.0060.00617.01
7.2.00.0070.00718.15
7.1.250.0070.00315.77
7.1.240.0030.00715.58
7.1.230.0120.00315.44
7.1.220.0060.00815.82
7.1.210.0080.00615.67
7.1.200.0090.00015.55
7.1.190.0040.00715.79
7.1.180.0000.01515.80
7.1.170.0040.00815.56
7.1.160.0070.00415.71
7.1.150.0070.00315.63
7.1.140.0080.00015.74
7.1.130.0140.00315.74
7.1.120.0040.00815.77
7.1.110.0060.00315.61
7.1.100.0080.00316.87
7.1.90.0070.00715.82
7.1.80.0070.00715.80
7.1.70.0020.00716.42
7.1.60.0100.00817.65
7.1.50.0050.01416.23
7.1.40.0080.00015.48
7.1.30.0070.00315.72
7.1.20.0080.00015.77
7.1.10.0040.01115.75
7.1.00.0050.03819.06
7.0.330.0030.00715.39
7.0.320.0110.00015.38
7.0.310.0040.00815.25
7.0.300.0080.00615.07
7.0.290.0030.00715.41
7.0.280.0040.01115.36
7.0.270.0060.00615.26
7.0.260.0080.00015.31
7.0.250.0030.00915.05
7.0.240.0060.00615.14
7.0.230.0070.00315.34
7.0.220.0110.00415.59
7.0.210.0040.00815.12
7.0.200.0000.00915.98
7.0.190.0060.00615.08
7.0.180.0090.00315.41
7.0.170.0070.00715.19
7.0.160.0040.00715.35
7.0.150.0000.00815.16
7.0.140.0050.03818.81
7.0.130.0030.00715.47
7.0.120.0030.00615.10
7.0.110.0060.00315.20
7.0.100.0080.00015.40
7.0.90.0060.00615.45
7.0.80.0090.00015.54
7.0.70.0090.00615.26
7.0.60.0030.04317.69
7.0.50.0110.03516.48
7.0.40.0060.04816.83
7.0.30.0170.04016.80
7.0.20.0230.04016.77
7.0.10.0050.03516.73
7.0.00.0030.03616.84
5.6.380.0060.00913.87
5.6.370.0040.00814.44
5.6.360.0070.00414.25
5.6.350.0070.00714.08
5.6.340.0030.01014.36
5.6.330.0070.00314.17
5.6.320.0070.00714.66
5.6.310.0070.00714.36
5.6.300.0030.00714.25
5.6.290.0110.00314.21
5.6.280.0050.04017.51
5.6.270.0040.00814.29
5.6.260.0060.00614.19
5.6.250.0030.00614.21
5.6.240.0050.00514.20
5.6.230.0030.00714.25
5.6.220.0110.00314.34
5.6.210.0050.04117.66
5.6.200.0070.03016.19
5.6.190.0070.04317.34
5.6.180.0090.03417.31
5.6.170.0200.03717.36
5.6.160.0090.02317.54
5.6.150.0110.02516.16
5.6.140.0070.02716.06
5.6.130.0030.02516.31
5.6.120.0080.03917.73
5.6.110.0050.02217.64
5.6.100.0120.03817.68
5.6.90.0060.04917.65
5.6.80.0160.03117.20
5.6.70.0040.00414.07
5.6.60.0040.00714.32
5.6.50.0040.01114.27
5.6.40.0000.01414.11
5.6.30.0100.00314.19
5.6.20.0040.01114.30
5.6.10.0030.01013.95
5.6.00.0070.01014.13
5.5.380.0070.00311.18
5.5.370.0030.00311.18
5.5.360.0070.00011.25
5.5.350.0020.04615.78
5.5.340.0050.04314.57
5.5.330.0050.04015.68
5.5.320.0120.02715.75
5.5.310.0170.04015.74
5.5.300.0040.04514.58
5.5.290.0100.03714.63
5.5.280.0020.03215.93
5.5.270.0100.04016.02
5.5.260.0090.04015.99
5.5.250.0050.02515.90
5.5.240.0030.03515.65
5.5.230.0070.00311.20
5.5.220.0040.00411.18
5.5.210.0030.00611.18
5.5.200.0000.01011.18
5.5.190.0000.01111.18
5.5.180.0000.01011.18
5.5.170.0030.00911.18
5.5.160.0000.00711.18
5.5.150.0000.00811.18
5.5.140.0070.00311.18
5.5.130.0000.00811.18
5.5.120.0000.01011.18
5.5.110.0030.00511.18
5.5.100.0040.00411.18
5.5.90.0050.00011.23
5.5.80.0000.00811.18
5.5.70.0050.00311.18
5.5.60.0060.00311.18
5.5.50.0000.00711.18
5.5.40.0000.00811.18
5.5.30.0000.00611.18
5.5.20.0100.00011.18
5.5.10.0070.00211.18
5.5.00.0000.01111.18
5.4.450.0080.02115.41
5.4.440.0200.02615.20
5.4.430.0500.04015.24
5.4.420.0470.03715.36
5.4.410.0470.02815.25
5.4.400.0570.03815.21
5.4.390.0490.03715.15
5.4.380.0070.03015.00
5.4.370.0120.02714.82
5.4.360.0070.03014.99
5.4.350.0050.03314.98
5.4.340.0080.02714.83
5.4.330.0000.01111.18
5.4.320.0040.02011.84
5.4.310.0040.02311.84
5.4.300.0060.02311.84
5.4.290.0110.02311.84
5.4.280.0060.02711.79
5.4.270.0050.02711.79
5.4.260.0060.02911.79
5.4.250.0100.02611.79
5.4.240.0050.02911.79
5.4.230.0040.03011.78
5.4.220.0080.02511.79
5.4.210.0060.02711.79
5.4.200.0110.05911.78
5.4.190.0080.02611.78
5.4.180.0030.03111.78
5.4.170.0040.03011.79
5.4.160.0040.02911.79
5.4.150.0080.02311.78
5.4.140.0060.02711.63
5.4.130.0070.02411.62
5.4.120.0110.02411.60
5.4.110.0050.02911.60
5.4.100.0060.02711.59
5.4.90.0040.03011.60
5.4.80.0080.02511.60
5.4.70.0030.02811.59
5.4.60.0100.05811.59
5.4.50.0100.02511.59
5.4.40.0090.04911.59
5.4.30.0070.03211.59
5.4.20.0070.02811.59
5.4.10.0050.03211.59
5.4.00.0070.02911.33
5.3.290.0040.02711.99
5.3.280.0120.02511.94
5.3.270.0100.02711.95
5.3.260.0040.02711.95
5.3.250.0120.03111.95
5.3.240.0050.03311.95
5.3.230.0040.02911.94
5.3.220.0090.02511.93
5.3.210.0070.02911.93
5.3.200.0040.02611.93
5.3.190.0040.02211.93
5.3.180.0060.02111.93
5.3.170.0080.01911.92
5.3.160.0090.02011.93
5.3.150.0080.02611.92
5.3.140.0070.02711.92
5.3.130.0070.03211.92
5.3.120.0040.03111.91
5.3.110.0050.02611.92
5.3.100.0050.02411.65
5.3.90.0040.02611.64
5.3.80.0080.02411.64
5.3.70.0040.02511.64
5.3.60.0070.02711.63
5.3.50.0040.02611.60
5.3.40.0090.03511.60
5.3.30.0040.02611.58
5.3.20.0060.02511.47
5.3.10.0070.02311.46
5.3.00.0060.02511.45
5.2.170.0060.02110.20
5.2.160.0020.02510.20
5.2.150.0050.02210.20
5.2.140.0070.02310.19
5.2.130.0050.02510.17
5.2.120.0060.02310.17
5.2.110.0030.02610.18
5.2.100.0100.02010.18
5.2.90.0060.02310.18
5.2.80.0050.02310.17
5.2.70.0070.02210.17
5.2.60.0040.02810.15
5.2.50.0070.03610.14
5.2.40.0110.04110.12
5.2.30.0130.04710.11
5.2.20.0110.02510.11
5.2.10.0170.04710.06
5.2.00.0060.0289.99
5.1.60.0060.0249.63
5.1.50.0070.0239.63
5.1.40.0070.0239.62
5.1.30.0020.0309.80
5.1.20.0100.0309.81
5.1.10.0100.0479.67
5.1.00.0120.0389.67
5.0.50.0040.0288.91
5.0.40.0070.0318.84
5.0.30.0060.0248.74
5.0.20.0020.0268.73
5.0.10.0060.0288.72
5.0.00.0030.0298.71
4.4.90.0070.0177.98
4.4.80.0090.0207.96
4.4.70.0070.0207.97
4.4.60.0040.0247.96
4.4.50.0050.0247.97
4.4.40.0040.0257.94
4.4.30.0050.0237.97
4.4.20.0020.0148.01
4.4.10.0030.0158.01
4.4.00.0050.0217.97
4.3.110.0040.0167.92
4.3.100.0040.0177.92
4.3.90.0030.0127.91
4.3.80.0040.0277.88
4.3.70.0040.0187.90
4.3.60.0020.0197.90
4.3.50.0040.0167.90
4.3.40.0020.0247.86
4.3.30.0020.0187.24
4.3.20.0020.0177.22
4.3.10.0050.0127.21
4.3.00.0020.01111.88