3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $newsPiece['pages'] = 'A15'; if ((int)$newsPiece['pages']):?> <?php echo $newsPiece['pages']?><?php endif;?> <?php $newsPiece['pages'] = '15-38'; if ((int)$newsPiece['pages']):?> <?php echo $newsPiece['pages']?><?php endif;?> <?php $newsPiece['pages'] = '15B'; if ((int)$newsPiece['pages']):?> <?php echo $newsPiece['pages']?><?php endif;?> <?php $newsPiece['pages'] = 'A15B'; if ((int)$newsPiece['pages']):?> <?php echo $newsPiece['pages']?><?php endif;?>

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.01419.48
7.1.100.0070.00418.16
7.1.70.0040.00416.94
7.1.60.0140.01119.82
7.1.50.0070.01316.77
7.1.00.0100.07022.44
7.0.200.0060.00616.46
7.0.140.0070.07022.00
7.0.60.0030.06319.92
7.0.50.0000.04317.88
7.0.40.0100.08020.02
7.0.30.0330.08020.18
7.0.20.0230.06020.03
7.0.10.0230.04320.18
7.0.00.0100.04320.13
5.6.280.0030.07320.89
5.6.210.0070.08320.75
5.6.200.0100.07718.12
5.6.190.0070.04720.49
5.6.180.3200.03320.50
5.6.170.0230.08020.45
5.6.160.0000.04720.37
5.6.150.0070.07318.12
5.6.140.0100.06318.16
5.6.130.0100.04718.11
5.6.120.0100.07020.89
5.6.110.0070.08720.98
5.6.100.0070.09021.04
5.6.90.0170.08021.11
5.6.80.0100.07720.35
5.6.70.0330.05320.43
5.5.350.0030.05020.30
5.5.340.0030.04718.01
5.5.330.0030.04320.57
5.5.320.0300.05020.27
5.5.310.0270.06020.17
5.5.300.0070.08017.98
5.5.290.0070.03717.98
5.5.280.0100.06720.80
5.5.270.0100.05720.86
5.5.260.0070.05720.86
5.5.250.0030.08320.61
5.5.240.0030.08020.11
5.4.450.0270.04719.24
5.4.440.0470.04019.56
5.4.430.0230.03719.48
5.4.420.0270.03319.54
5.4.410.0130.04319.24
5.4.400.0200.04718.51
5.4.390.0070.05718.72
5.4.380.0330.04718.59
5.4.370.0070.06018.52
5.4.360.0100.05318.49
5.4.350.0300.04018.62
5.4.340.0170.05018.71
5.4.320.0050.03812.46
5.4.310.0050.03912.45
5.4.300.0050.03812.45
5.4.290.0040.04012.45
5.4.280.0060.03612.35
5.4.270.0200.04318.97
5.4.260.0030.05718.83
5.4.250.0100.05019.14
5.4.240.0130.06719.00
5.4.230.0100.05718.91
5.4.220.0130.05318.98
5.4.210.0100.05719.00
5.4.200.0200.04319.04
5.4.190.0100.05718.99
5.4.180.0100.05718.90
5.4.170.0100.05318.98
5.4.160.0130.05318.98
5.4.150.0030.08318.98
5.4.140.0130.05316.41
5.4.130.0130.05316.35
5.4.120.0100.05016.34
5.4.110.0170.05016.49
5.4.100.0200.04716.34
5.4.90.0070.05316.51
5.4.80.0100.05016.44
5.4.70.0100.07016.58
5.4.60.0100.05316.34
5.4.50.0200.04716.32
5.4.40.0100.05716.51
5.4.30.0170.06016.31
5.4.20.0100.06016.40
5.4.10.0130.05716.46
5.4.00.0100.05015.82
5.3.290.0070.03812.80
5.3.280.0000.08014.54
5.3.270.0130.06314.39
5.3.260.0130.06714.78
5.3.250.0100.05314.42
5.3.240.0100.05314.58
5.3.230.0100.05014.75
5.3.220.0000.07014.38
5.3.210.0230.06014.73
5.3.200.0070.07714.71
5.3.190.0230.04014.55
5.3.180.0170.05014.55
5.3.170.0030.06714.66
5.3.160.0100.07014.67
5.3.150.0130.06014.54
5.3.140.0070.05714.54
5.3.130.0170.05714.61
5.3.120.0170.06714.54
5.3.110.0170.05714.74
5.3.100.0100.05314.07
5.3.90.0130.05714.17
5.3.80.0030.07014.00
5.3.70.0100.06714.00
5.3.60.0100.06314.07
5.3.50.0100.05713.93
5.3.40.0100.06014.06
5.3.30.0200.06714.10
5.3.20.0130.05713.76
5.3.10.0130.04313.64
5.3.00.0070.06713.45
5.2.170.0070.04711.28
5.2.160.0070.04711.07
5.2.150.0000.06711.07
5.2.140.0270.03711.29
5.2.130.0130.04710.91
5.2.120.0100.05711.36
5.2.110.0070.04711.02
5.2.100.0100.04011.31
5.2.90.0000.06311.22
5.2.80.0070.05311.07
5.2.70.0030.04311.24
5.2.60.0100.04011.18
5.2.50.0070.06010.94
5.2.40.0030.04710.98
5.2.30.0130.04711.09
5.2.20.0030.04710.89
5.2.10.0100.04010.91
5.2.00.0070.05710.92
5.1.60.0070.04010.02
5.1.50.0030.0409.96
5.1.40.0030.04710.13
5.1.30.0000.04010.55
5.1.20.0130.03710.34
5.1.10.0030.05710.10
5.1.00.0030.05310.29
5.0.50.0100.0378.42
5.0.40.0000.0308.56
5.0.30.0100.0508.34
5.0.20.0130.0308.47
5.0.10.0070.0338.32
5.0.00.0000.0478.41
4.4.90.0000.0237.41
4.4.80.0070.0237.41
4.4.70.0030.0237.41
4.4.60.0000.0307.41
4.4.50.0030.0207.41
4.4.40.0070.0337.41
4.4.30.0100.0177.41
4.4.20.0000.0337.41
4.4.10.0000.0277.41
4.4.00.0030.0337.41
4.3.110.0070.0277.41
4.3.100.0000.0237.41
4.3.90.0070.0177.41
4.3.80.0100.0277.41
4.3.70.0000.0237.41
4.3.60.0000.0277.41
4.3.50.0000.0307.41
4.3.40.0070.0377.41
4.3.30.0070.0207.41
4.3.20.0030.0207.41
4.3.10.0100.0237.41
4.3.00.0000.02015.59