3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search = "apple%0d%0a<?php phpinfo(); ?>"; 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."; ?>
based on ML9kj

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.00.0040.00819.63
7.1.100.0060.00317.89
7.1.70.0040.00717.41
7.1.60.0110.01419.25
7.1.50.0110.01417.07
7.1.00.0000.07722.45
7.0.200.0040.00416.83
7.0.140.0030.07322.08
7.0.60.0230.04320.01
7.0.50.0000.04017.69
7.0.40.0070.08720.00
7.0.30.0330.07020.32
7.0.20.0400.07020.02
7.0.10.0170.07020.20
7.0.00.0000.09020.34
5.6.280.0030.07321.13
5.6.210.0030.07720.67
5.6.200.0070.08018.11
5.6.190.0100.04020.41
5.6.180.0330.08020.58
5.6.170.0330.07320.41
5.6.160.0100.07720.46
5.6.150.0100.05018.15
5.6.140.0070.05318.16
5.6.130.0130.06718.18
5.6.120.0070.06721.13
5.6.110.0100.08720.88
5.6.100.0070.05321.14
5.6.90.0070.06320.96
5.6.80.0000.05720.38
5.5.350.4470.03720.38
5.5.340.0030.03718.01
5.5.330.0100.07720.56
5.5.320.0270.06720.51
5.5.310.0230.04020.50
5.5.300.0130.07717.84
5.5.290.0030.08317.94
5.5.280.0000.04720.77
5.5.270.0030.04020.73
5.5.260.0100.08020.64
5.5.250.0070.08720.62
5.5.240.0070.03320.26
5.4.450.0800.07019.63
5.4.440.0170.05019.16
5.4.430.0800.05019.15
5.4.420.0730.05019.49
5.4.410.0600.07019.39
5.4.400.0800.04319.11
5.4.390.0670.05719.21
5.4.380.0030.05318.72
5.4.370.0100.04018.60
5.4.360.0130.04318.44
5.4.350.0050.03611.98
5.4.340.0040.04311.98
5.4.320.0060.03912.46
5.4.310.0110.04712.46
5.4.300.0090.05512.46
5.4.290.0060.05312.46
5.4.280.0100.04812.36
5.4.270.0120.04812.36
5.4.260.0050.06812.36
5.4.250.0110.06012.36
5.4.240.0080.03712.36
5.4.230.0110.03612.35
5.4.220.0070.04112.35
5.4.210.0100.04612.35
5.4.200.0090.05612.35
5.4.190.0140.04812.34
5.4.180.0050.05712.34
5.4.170.0090.03812.36
5.4.160.0090.03712.36
5.4.150.0060.04012.35
5.4.140.0110.04612.03
5.4.130.0060.04012.02
5.4.120.0050.03711.98
5.4.110.0080.04511.97
5.4.100.0140.05411.97
5.4.90.0080.04011.98
5.4.80.0080.04211.98
5.4.70.0080.03911.97
5.4.60.0060.04011.97
5.4.50.0040.03911.97
5.4.40.0070.05111.96
5.4.30.0070.04511.96
5.4.20.0090.04811.96
5.4.10.0070.04211.96
5.4.00.0070.05411.45
5.3.290.0070.04712.80
5.3.280.0060.04412.71
5.3.270.0100.06912.73
5.3.260.0090.04312.72
5.3.250.0050.04812.72
5.3.240.0040.05512.72
5.3.230.0120.05412.71
5.3.220.0060.04112.68
5.3.210.0110.04112.68
5.3.200.0100.03512.68
5.3.190.0070.03912.68
5.3.180.0070.03912.67
5.3.170.0040.04312.67
5.3.160.0100.04412.67
5.3.150.0080.04912.67
5.3.140.0070.04712.66
5.3.130.0130.05912.65
5.3.120.0110.04912.65
5.3.110.0100.05812.66
5.3.100.0100.05712.12
5.3.90.0130.07212.08
5.3.80.0070.04112.08
5.3.70.0050.03912.07
5.3.60.0070.03712.06
5.3.50.0090.04112.01
5.3.40.0210.06412.00
5.3.30.0150.06411.96
5.3.20.0090.05411.75
5.3.10.0170.04111.71
5.3.00.0090.05411.70
5.2.170.0050.0379.20
5.2.160.0130.0649.20
5.2.150.0140.0819.20
5.2.140.0160.0649.20
5.2.130.0070.0409.16
5.2.120.0130.0529.16
5.2.110.0080.0529.17
5.2.100.0110.0609.16
5.2.90.0120.0709.16
5.2.80.0080.0619.16
5.2.70.0100.0709.16
5.2.60.0150.0549.11
5.2.50.0060.0619.07
5.2.40.0060.0709.06
5.2.30.0050.0339.04
5.2.20.0090.0539.02
5.2.10.0060.0538.93
5.2.00.0080.0518.79
5.1.60.0080.0358.08
5.1.50.0070.0558.07
5.1.40.0120.0488.05
5.1.30.0100.0618.40
5.1.20.0080.0378.43
5.1.10.0040.0398.15
5.1.00.0030.0358.15
5.0.50.0060.0256.63
5.0.40.0070.0236.49
5.0.30.0120.0516.30
5.0.20.0020.0286.27
5.0.10.0030.0316.25
5.0.00.0070.0406.24
4.4.90.0060.0194.78
4.4.80.0030.0214.75
4.4.70.0060.0224.76
4.4.60.0080.0414.76
4.4.50.0040.0194.77
4.4.40.0150.0664.71
4.4.30.0070.0384.76
4.4.20.0060.0414.84
4.4.10.0100.0384.85
4.4.00.0110.0704.76
4.3.110.0120.0434.67
4.3.100.0110.0314.67
4.3.90.0030.0164.64
4.3.80.0050.0304.58
4.3.70.0070.0364.63
4.3.60.0040.0174.63
4.3.50.0060.0184.62
4.3.40.0070.0354.54
4.3.30.0030.0213.30
4.3.20.0030.0213.28
4.3.10.0040.0193.24
4.3.00.0030.0207.94