3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$search = htmlentities($_GET['search']); $search=htmlentities("phpinfo()////|apple/e\x00"); echo $search; if (strpos($search, 'apple') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "apple"); }elseif (strpos($search, 'orange') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "orange"); }elseif (strpos($search, 'banana') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "banana"); }elseif (strpos($search, 'kiwi') !== false){ echo preg_replace("/".$search."/", $search." <img src='".$search.".png'>", "kiwi"); }else echo "Please search for apple, orange, banana, or kiwi.";

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.0290.01498.97
7.3.0rc30.0060.01216.63
7.3.0beta10.0040.00712.58
7.3.0alpha10.0070.00312.99
7.2.60.0090.00317.08
7.1.200.0120.00315.52
7.1.70.0100.00317.38
7.1.60.0200.00319.82
7.1.50.0090.01517.09
7.1.00.0000.07722.24
7.0.200.0000.01116.97
7.0.140.0070.07022.00
7.0.60.0130.06319.83
7.0.50.0030.04017.89
7.0.40.0070.04720.12
7.0.30.0230.04320.30
7.0.20.0230.08320.04
7.0.10.0300.07320.09
7.0.00.0100.08020.16
5.6.280.0030.09321.07
5.6.210.0070.05720.75
5.6.200.0030.04018.22
5.6.190.0130.04020.63
5.6.180.4100.04020.43
5.6.170.0400.05020.69
5.6.160.0130.08020.32
5.6.150.0070.04318.21
5.6.140.0030.06718.15
5.6.130.0070.03718.22
5.6.120.0070.08321.12
5.6.110.0030.09021.11
5.6.100.0070.04021.01
5.6.90.0070.03721.12
5.6.80.0030.05320.38
5.6.70.0270.07720.35
5.5.350.0070.06020.36
5.5.340.0170.06317.93
5.5.330.0070.04320.23
5.5.320.0170.04020.17
5.5.310.0330.04020.30
5.5.300.0030.08017.96
5.5.290.0130.04317.97
5.5.280.0070.03720.77
5.5.270.0070.08720.88
5.5.260.0070.03720.85
5.5.250.0100.04320.69
5.5.240.0130.04020.23
5.4.450.0500.06019.10
5.4.440.0630.05719.48
5.4.430.0030.06019.24
5.4.420.0170.04719.40
5.4.410.0130.05019.31
5.4.400.0630.00018.78
5.4.390.0700.00018.55
5.4.380.0270.06018.52
5.4.370.0330.05718.61
5.4.360.0330.05718.50
5.4.350.0300.06018.47
5.4.340.0300.05718.52
5.4.320.0070.03512.46
5.4.310.0100.04212.46
5.4.300.0030.03912.46
5.4.290.0050.05112.46
5.4.280.0050.04212.36
5.4.270.0060.04212.36
5.4.260.0030.06018.82
5.4.250.0270.04318.98
5.4.240.0100.05018.63
5.4.230.0100.05018.63
5.4.220.0130.05018.74
5.4.210.0170.05718.86
5.4.200.0100.05018.73
5.4.190.0030.06019.00
5.4.180.0170.06018.63
5.4.170.0030.06018.91
5.4.160.0030.05319.02
5.4.150.0170.05018.70
5.4.140.0100.05316.18
5.4.130.0130.04316.34
5.4.120.0100.06316.41
5.4.110.0200.05716.30
5.4.100.0130.04716.18
5.4.90.0200.04316.49
5.4.80.0070.05716.36
5.4.70.0070.05016.27
5.4.60.0070.05016.29
5.4.50.0200.03716.27
5.4.40.0100.05316.27
5.4.30.0130.04316.41
5.4.20.0030.05316.36
5.4.10.0070.05316.51
5.4.00.0100.06015.71
5.3.290.0080.05712.80
5.3.280.0130.04714.49
5.3.270.0100.05714.64
5.3.260.0030.06314.63
5.3.250.0130.04314.50
5.3.240.0130.06314.63
5.3.230.0000.05714.61
5.3.220.0100.06714.46
5.3.210.0130.06714.57
5.3.200.0070.07314.36
5.3.190.0100.06314.43
5.3.180.0130.06314.59
5.3.170.0100.04714.64
5.3.160.0100.04714.46
5.3.150.0230.03714.59
5.3.140.0070.06714.26
5.3.130.0030.05714.55
5.3.120.0100.07314.44
5.3.110.0130.04714.43
5.3.100.0070.05313.89
5.3.90.0070.05714.05
5.3.80.0070.08014.04
5.3.70.0100.06013.96
5.3.60.0100.05713.78
5.3.50.0000.07713.90
5.3.40.0130.04313.73
5.3.30.0070.05013.96
5.3.20.0100.06313.70
5.3.10.0130.04313.52
5.3.00.0070.05013.59
5.2.170.0070.04011.25
5.2.160.0030.06011.04
5.2.150.0070.05711.07
5.2.140.0070.04011.07
5.2.130.0070.03711.00
5.2.120.0130.03311.00
5.2.110.0100.04011.03
5.2.100.0070.04011.13
5.2.90.0000.04311.04
5.2.80.0030.04311.11
5.2.70.0000.04711.09
5.2.60.0030.04311.10
5.2.50.0070.03711.14
5.2.40.0070.03710.91
5.2.30.0030.04310.98
5.2.20.0030.05710.99
5.2.10.0100.03310.63
5.2.00.0070.04010.95
5.1.60.0100.04310.10
5.1.50.0100.03010.09
5.1.40.0070.0339.76
5.1.30.0100.03010.32
5.1.20.0030.03710.28
5.1.10.0030.03710.22
5.1.00.0070.03310.17
5.0.50.0070.0278.48
5.0.40.0030.0338.45
5.0.30.0030.0408.20
5.0.20.0100.0238.04
5.0.10.0070.0278.14
5.0.00.0030.0408.23
4.4.90.0070.0276.65
4.4.80.0070.0176.65
4.4.70.0030.0206.65
4.4.60.0070.0276.65
4.4.50.0070.0176.65
4.4.40.0000.0376.65
4.4.30.0000.0276.65
4.4.20.0000.0236.65
4.4.10.0000.0236.65
4.4.00.0030.0336.65
4.3.110.0000.0236.65
4.3.100.0030.0306.65
4.3.90.0000.0236.65
4.3.80.0000.0476.65
4.3.70.0030.0206.65
4.3.60.0070.0176.65
4.3.50.0030.0206.65
4.3.40.0000.0376.65
4.3.30.0030.0206.65
4.3.20.0000.0276.65
4.3.10.0000.0236.65
4.3.00.0070.0209.21