3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array('1' => 'A_VALUE'); foreach ($data as $key => $value) { if ($key == "password") { print_r($key); print_r('key matches'); } }

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.0140.00398.97
7.3.0rc30.0060.00916.59
7.3.0beta10.0060.00312.60
7.3.0alpha10.0030.00712.76
7.2.60.0070.00716.91
7.2.00.0030.01019.25
7.1.200.0050.00515.49
7.1.100.0560.01215.41
7.1.70.0000.00717.02
7.1.60.0140.01119.40
7.1.50.0070.01416.88
7.1.00.0070.07322.34
7.0.200.0170.00314.68
7.0.140.0070.06322.08
7.0.120.0000.07721.92
7.0.60.0000.09019.95
7.0.50.0100.05717.80
7.0.40.0170.07017.75
7.0.30.0100.03317.76
7.0.20.0070.07317.79
7.0.10.0030.05717.77
7.0.00.0070.08017.71
5.6.280.0030.07321.05
5.6.210.0170.07020.50
5.6.200.0130.05718.14
5.6.190.0100.04018.20
5.6.180.0070.04018.12
5.6.170.0100.07318.09
5.6.160.0030.06018.08
5.6.150.0070.06018.11
5.6.140.0070.07318.11
5.6.130.0070.06318.12
5.6.120.0100.08018.13
5.6.110.0070.06718.08
5.6.100.0070.08318.21
5.6.90.0130.06318.19
5.6.80.0130.05317.53
5.6.70.0070.03717.49
5.6.60.0100.03717.45
5.6.50.0030.05717.57
5.6.40.0070.08017.53
5.6.30.0070.04717.45
5.6.20.0030.04017.44
5.6.10.0070.03717.52
5.6.00.0100.06317.46
5.5.350.0330.07720.40
5.5.340.0070.03717.88
5.5.330.0100.06717.91
5.5.320.0000.04317.98
5.5.310.0030.04017.98
5.5.300.0170.06718.04
5.5.290.0170.06717.94
5.5.280.0070.05317.98
5.5.270.0070.05717.87
5.5.260.0070.04018.00
5.5.250.0070.03717.80
5.5.240.0070.05317.34
5.5.230.0170.06017.27
5.5.220.0030.03717.34
5.5.210.0070.03717.35
5.5.200.0200.06717.37
5.5.190.0100.07717.31
5.5.180.0100.04317.35
5.5.160.0100.04717.27
5.5.150.0070.07317.30
5.5.140.0070.04017.22
5.5.130.0130.05317.33
5.5.120.0000.05017.33
5.5.110.0000.04317.33
5.5.100.0000.05317.20
5.5.90.0070.07017.12
5.5.80.0100.03317.27
5.5.70.0100.07717.21
5.5.60.0000.07717.20
5.5.50.0100.07717.22
5.5.40.0030.07717.22
5.5.30.0070.07317.20
5.5.20.0170.05317.25
5.5.10.0100.06317.20
5.5.00.0070.07317.20
5.4.450.0100.04019.28
5.4.440.0130.07719.30
5.4.430.0170.07319.26
5.4.420.0100.03319.32
5.4.410.0000.05019.23
5.4.400.0070.07019.03
5.4.390.0070.07719.09
5.4.380.0100.05319.13
5.4.370.0000.04318.98
5.4.360.0070.04718.95
5.4.350.0030.05018.97
5.4.340.0030.04018.98
5.4.320.0030.06718.98
5.4.310.0200.06719.05
5.4.300.0130.03319.03
5.4.290.0100.03319.02
5.4.280.0100.07019.07
5.4.270.0100.06019.12
5.4.260.0100.06719.03
5.4.250.0000.04019.11
5.4.240.0030.04319.21
5.4.230.0030.04019.02
5.4.220.0100.06718.88
5.4.210.0100.07719.08
5.4.200.0100.06718.97
5.4.190.0030.08018.80
5.4.180.0070.06318.99
5.4.170.0130.06318.96
5.4.160.0070.04318.91
5.4.150.0130.06718.96
5.4.140.0100.04316.30
5.4.130.0130.05016.34
5.4.120.0170.06316.16
5.4.110.0070.07716.28
5.4.100.0030.04316.20
5.4.90.0070.07716.28
5.4.80.0100.03016.26
5.4.70.0070.07016.26
5.4.60.0100.04316.42
5.4.50.0100.06716.25
5.4.40.0030.08016.41
5.4.30.0030.05316.25
5.4.20.0030.05316.39
5.4.10.0200.06016.25
5.4.00.0170.05315.77
5.3.290.0130.07714.62
5.3.280.0030.07714.45
5.3.270.0030.06014.60
5.3.260.0100.07714.54
5.3.250.0030.07314.57
5.3.240.0070.04014.57
5.3.230.0130.07314.37
5.3.220.0070.07014.55
5.3.210.0030.08014.42
5.3.200.0000.07714.34
5.3.190.0130.05314.55
5.3.180.0200.06014.48
5.3.170.0070.03314.39
5.3.160.0070.06714.48
5.3.150.0100.05714.39
5.3.140.0030.05314.48
5.3.130.0030.08014.52
5.3.120.0100.07314.40
5.3.110.0070.07714.46
5.3.100.0070.07013.98
5.3.90.0100.07013.95
5.3.80.0100.05713.94
5.3.70.0030.06013.93
5.3.60.0070.04013.91
5.3.50.0070.03713.89
5.3.40.0070.03713.80
5.3.30.0000.04313.85
5.3.20.0030.06013.64
5.3.10.0070.07713.58
5.3.00.0070.07713.60
5.2.170.0100.04311.15
5.2.160.0070.04311.14
5.2.150.0070.02711.10
5.2.140.0030.07011.11
5.2.130.0030.05311.04
5.2.120.0070.06011.07
5.2.110.0070.06010.88
5.2.100.0070.05011.05
5.2.90.0170.04711.01
5.2.80.0130.04011.02
5.2.70.0070.04710.92
5.2.60.0030.06311.03
5.2.50.0070.03311.04
5.2.40.0070.03310.93
5.2.30.0100.05710.96
5.2.20.0100.03310.78
5.2.10.0030.06710.75
5.2.00.0030.05710.77
5.1.60.0030.04310.03
5.1.50.0070.0509.96
5.1.40.0070.0509.89
5.1.30.0070.05310.38
5.1.20.0030.06310.38
5.1.10.0030.0579.98
5.1.00.0000.05310.01
5.0.50.0030.0278.72
5.0.40.0000.0208.72
5.0.30.0000.0538.72
5.0.20.0070.0238.72
5.0.10.0000.0338.72
5.0.00.0070.0278.72
4.4.90.0030.0378.72
4.4.80.0070.0208.72
4.4.70.0030.0278.72
4.4.60.0030.0178.72
4.4.50.0030.0378.72
4.4.40.0000.0378.72
4.4.30.0070.0308.72
4.4.20.0070.0338.72
4.4.10.0000.0238.72
4.4.00.0000.0308.72
4.3.110.0000.0338.72
4.3.100.0030.0378.72
4.3.90.0070.0108.72
4.3.80.0070.0208.72
4.3.70.0070.0108.72
4.3.60.0030.0378.72
4.3.50.0030.0238.72
4.3.40.0000.0538.72
4.3.30.0000.0278.72
4.3.20.0000.0208.72
4.3.10.0000.0208.72
4.3.00.0030.0378.72