3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php eval ( " $halt = !!!!!1 //MAKE SURE THIS IS FALSE! ; if ( version_compare( phpversion() , '5.3' ) === // This cannot be on a new line, working with PHP developers to fix! 1 ) { eval ( 'HALTCHECK:' ) ; } if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else if ( $halt // Make sure that this is still false! ) { } else { if ( $halt // One last check! ) { if ( version_compare( phpversion() , '5.3' ) === 1 ) { $halt = !!!!!!$halt ; eval ( 'goto HALTCHECK ;' ) ; } eval ( '__halt_compiler ( ) ;' // BAIL OUT, MAJOR /MAJOR/ ISSUES! ) ; } $emphasis = '!' // We may change this later ; echo 'good' . ' ' . 'programming' . $emphasis ; // Semi-colon on next line always! } if ( function_exists( '__halt_compiler' ) ) { eval ( '__halt_compiler ( ) ;' ) ; }" ) ;

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.60.0000.01416.84
7.2.00.0110.00619.23
7.1.200.0030.01215.55
7.1.100.0080.00517.70
7.1.70.0090.00317.18
7.1.60.0110.01419.40
7.1.50.0120.00916.81
7.1.00.0070.06322.36
7.0.200.0070.00016.78
7.0.140.0030.07021.95
7.0.60.0100.08319.86
7.0.50.0070.04717.84
7.0.40.0070.04020.20
7.0.30.0130.06720.11
7.0.20.0030.04720.17
7.0.10.0030.05320.14
7.0.00.0070.04720.29
5.6.280.0100.06721.05
5.6.210.0100.08720.64
5.6.200.0030.08018.21
5.6.190.0070.06020.51
5.6.180.0130.07320.47
5.6.170.0130.06020.41
5.6.160.0100.05020.45
5.6.150.0070.05020.37
5.6.140.0030.04320.41
5.6.130.0030.05020.52
5.6.120.0070.04020.37
5.6.110.0030.04320.48
5.6.100.0000.05020.17
5.6.90.0130.07720.41
5.6.80.0070.04719.83
5.6.70.0100.08019.55
5.6.60.0070.05019.55
5.6.50.0070.04019.64
5.6.40.0030.05019.53
5.6.30.0030.05019.88
5.6.20.0070.07019.88
5.6.10.0100.06019.54
5.6.00.0000.04719.75
5.5.350.0070.04720.42
5.5.340.0100.03718.03
5.5.330.0070.08020.40
5.5.320.0030.04320.26
5.5.310.0170.04720.42
5.5.300.0100.05019.99
5.5.290.0030.07320.21
5.5.280.0030.04320.32
5.5.270.0100.08020.11
5.5.260.0100.08720.16
5.5.250.0030.05019.78
5.5.240.0030.04319.51
5.5.230.0130.07719.57
5.5.220.0000.08019.35
5.5.210.0030.04319.41
5.5.200.0100.08019.49
5.5.190.0100.07719.34
5.5.180.0070.08319.48
5.5.160.0100.07319.55
5.5.150.0100.04319.47
5.5.140.0030.05019.33
5.5.130.0030.05019.46
5.5.120.0000.08719.50
5.5.110.0100.08019.58
5.5.100.0100.05319.42
5.5.90.0100.07319.39
5.5.80.0000.05319.48
5.5.70.0070.05019.54
5.5.60.0000.08719.44
5.5.50.0070.05719.36
5.5.40.0070.03719.49
5.5.30.0070.06319.43
5.5.20.0070.06319.43
5.5.10.0100.08019.21
5.5.00.0030.05019.30
5.4.450.0130.07319.43
5.4.440.0070.08019.20
5.4.430.0130.06719.24
5.4.420.0070.04019.30
5.4.410.0170.05719.20
5.4.400.0200.04319.26
5.4.390.0100.07318.86
5.4.380.0100.07719.21
5.4.370.0070.04319.20
5.4.360.0000.09018.93
5.4.350.0030.08018.89
5.4.340.0070.08018.99
5.4.320.0070.03719.15
5.4.310.0100.07318.88
5.4.300.0070.04319.15
5.4.290.0100.03019.20
5.4.280.0070.06719.19
5.4.270.0070.06019.27
5.4.260.0130.05719.15
5.4.250.0030.07718.86
5.4.240.0030.05319.07
5.4.230.0030.08019.15
5.4.220.0100.05719.14
5.4.210.0070.05018.97
5.4.200.0070.05019.00
5.4.190.0000.04019.30
5.4.180.0100.06318.84
5.4.170.0130.06319.19
5.4.160.0100.07719.12
5.4.150.0230.05318.84
5.4.140.0030.07316.30
5.4.130.0000.08316.39
5.4.120.0100.07016.49
5.4.110.0100.06016.44
5.4.100.0130.06316.43
5.4.90.0070.05316.50
5.4.80.0030.05716.44
5.4.70.0130.03716.29
5.4.60.0070.06016.36
5.4.50.0030.04016.27
5.4.40.0030.04016.27
5.4.30.0030.04716.43
5.4.20.0030.03716.26
5.4.10.0000.04016.29
5.4.00.0100.03015.87
5.3.290.0030.08714.52
5.3.280.0070.04014.59
5.3.270.0070.06314.59
5.3.260.0130.05014.66
5.3.250.0030.06314.56
5.3.240.0100.06314.59
5.3.230.0130.05314.54
5.3.220.0170.03714.70
5.3.210.0030.05014.53
5.3.200.0030.07714.70
5.3.190.0130.06714.62
5.3.180.0070.04314.57
5.3.170.0070.07314.56
5.3.160.0100.04014.54
5.3.150.0030.08014.52
5.3.140.0100.06714.53
5.3.130.0070.05314.56
5.3.120.0070.03714.51
5.3.110.0230.03014.53
5.3.100.0000.04313.86
5.3.90.0070.03314.14
5.3.80.0100.07013.86
5.3.70.0200.03313.99
5.3.60.0170.06714.02
5.3.50.0030.05713.78
5.3.40.0100.05013.92
5.3.30.0000.06313.91
5.3.20.0070.06713.66
5.3.10.0000.07013.52
5.3.00.0130.03313.63
5.2.170.0070.06311.11
5.2.160.0070.06011.18
5.2.150.0070.03311.13
5.2.140.0030.06311.05
5.2.130.0030.04711.09
5.2.120.0070.02711.14
5.2.110.0030.05711.14
5.2.100.0030.03711.08
5.2.90.0070.02311.07
5.2.80.0070.02711.12
5.2.70.0000.05711.03
5.2.60.0000.04311.03
5.2.50.0000.03311.00
5.2.40.0000.03010.86
5.2.30.0030.02710.96
5.2.20.0000.03011.14
5.2.10.0100.05311.00
5.2.00.0100.05710.97
5.1.60.0070.03310.29
5.1.50.0100.05310.05
5.1.40.0000.04310.20
5.1.30.0030.05010.61
5.1.20.0030.02710.57
5.1.10.0070.05010.29
5.1.00.0100.05010.19
5.0.50.0030.0338.79
5.0.40.0030.0308.61
5.0.30.0030.0638.45
5.0.20.0070.0308.41
5.0.10.0070.0278.37
5.0.00.0000.0338.35
4.4.90.0070.0207.48
4.4.80.0070.0137.48
4.4.70.0030.0177.48
4.4.60.0030.0237.48
4.4.50.0000.0277.48
4.4.40.0030.0537.48
4.4.30.0030.0337.48
4.4.20.0070.0207.48
4.4.10.0070.0137.48
4.4.00.0000.0577.48
4.3.110.0000.0207.48
4.3.100.0170.0237.48
4.3.90.0030.0177.48
4.3.80.0030.0537.48
4.3.70.0000.0207.48
4.3.60.0000.0307.48
4.3.50.0000.0177.48
4.3.40.0030.0537.48
4.3.30.0030.0177.48
4.3.20.0000.0407.48
4.3.10.0000.0377.48
4.3.00.0000.0337.48