3v4l.org

run code in 300+ PHP versions simultaneously
<?php $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! } //__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).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0030.00919.32
7.1.100.0070.00718.00
7.1.70.0000.01016.96
7.1.60.0150.00919.29
7.1.50.0120.00316.70
7.1.00.0030.07022.38
7.0.200.0000.00916.86
7.0.140.0070.06722.22
7.0.60.0100.08019.77
7.0.50.0100.06017.64
7.0.40.0130.08720.25
7.0.30.0130.04720.34
7.0.20.0100.04720.21
7.0.10.0300.08020.21
7.0.00.0070.04320.10
5.6.280.0070.07020.96
5.6.210.0070.03720.60
5.6.200.0100.08318.27
5.6.190.0200.05720.50
5.6.180.3230.03020.53
5.6.170.0300.07320.66
5.6.160.0100.05020.57
5.6.150.0070.07718.17
5.6.140.0100.05018.12
5.6.130.0130.07318.15
5.6.120.0100.03320.94
5.6.110.0100.08321.15
5.6.100.0100.08721.04
5.6.90.0230.07321.16
5.6.80.0070.07720.39
5.6.70.0130.04320.43
5.5.350.0300.07720.59
5.5.340.0030.06318.03
5.5.330.0070.07720.32
5.5.320.0400.07020.22
5.5.310.0330.07020.44
5.5.300.0100.07718.02
5.5.290.0070.04718.08
5.5.280.0100.03720.95
5.5.270.0170.07720.70
5.5.260.0230.06720.90
5.5.250.0070.08320.84
5.5.240.0200.08020.24
5.4.450.0130.05719.32
5.4.440.0200.05719.46
5.4.430.0070.06019.56
5.4.420.0230.05019.60
5.4.410.0070.07019.45
5.4.400.0170.05019.36
5.4.390.0100.06019.00
5.4.380.0330.06318.77
5.4.370.0330.05018.56
5.4.360.0300.04718.80
5.4.350.0170.05318.70
5.4.340.0230.05318.73
5.4.320.0060.03612.52
5.4.310.0040.04412.52
5.4.300.0080.03712.52
5.4.290.0030.04412.52
5.4.280.0050.03812.42
5.4.270.0110.03512.42
5.4.260.0050.04112.42
5.4.250.0080.03612.42
5.4.240.0060.04412.42
5.4.230.0060.04612.41
5.4.220.0070.03812.41
5.4.210.0040.04112.41
5.4.200.0060.04712.41
5.4.190.0060.04512.41
5.4.180.0060.04112.41
5.4.170.0170.04412.41
5.4.160.0160.04612.41
5.4.150.0150.04512.40
5.4.140.0260.06312.09
5.4.130.0180.04112.07
5.4.120.0210.03712.04
5.4.110.0170.04112.03
5.4.100.0160.05012.03
5.4.90.0160.04312.02
5.4.80.0190.04112.02
5.4.70.0200.04312.02
5.4.60.0410.08312.02
5.4.50.0200.04412.02
5.4.40.0210.04012.01
5.4.30.0210.04112.00
5.4.20.0150.04412.01
5.4.10.0170.04312.01
5.4.00.0120.04611.49
5.3.290.0080.04112.80
5.3.280.0060.04912.71
5.3.270.0250.07012.73
5.3.260.0160.04812.72
5.3.250.0210.04012.72
5.3.240.0240.07212.72
5.3.230.0170.04812.71
5.3.220.0190.07612.68
5.3.210.0190.04612.68
5.3.200.0180.04512.68
5.3.190.0160.04912.68
5.3.180.0200.04612.68
5.3.170.0210.04212.68
5.3.160.0240.04312.68
5.3.150.0210.04612.68
5.3.140.0150.05212.66
5.3.130.0220.04312.66
5.3.120.0140.04712.66
5.3.110.0280.06512.66
5.3.100.0130.04812.15
5.3.90.0210.07112.14
5.3.80.0230.04212.12
5.3.70.0140.04712.12
5.3.60.0190.04212.11
5.3.50.0200.04512.05
5.3.40.0220.04112.05
5.3.30.0170.04412.02
5.3.20.0240.06711.80
5.3.10.0160.04111.77
5.3.00.0180.04411.74
5.2.170.0200.0309.26
5.2.160.0150.0329.25
5.2.150.0130.0349.25
5.2.140.0120.0369.26
5.2.130.0090.0399.21
5.2.120.0180.0599.21
5.2.110.0140.0359.21
5.2.100.0140.0339.21
5.2.90.0170.0319.21
5.2.80.0090.0439.20
5.2.70.0100.0379.21
5.2.60.0120.0359.16
5.2.50.0120.0409.13
5.2.40.0130.0359.11
5.2.30.0120.0359.08
5.2.20.0180.0339.08
5.2.10.0170.0329.00
5.2.00.0140.0368.86
5.1.60.0120.0298.14
5.1.50.0180.0278.13
5.1.40.0150.0298.13
5.1.30.0170.0308.47
5.1.20.0140.0328.51
5.1.10.0130.0338.22
5.1.00.0110.0328.22
5.0.50.0110.0256.74
5.0.40.0100.0246.60
5.0.30.0160.0616.41
5.0.20.0130.0226.39
5.0.10.0090.0266.37
5.0.00.0250.0886.35
4.4.90.0110.0174.77
4.4.80.0090.0174.75
4.4.70.0080.0204.76
4.4.60.0060.0214.75
4.4.50.0050.0214.77
4.4.40.0070.0304.74
4.4.30.0060.0214.76
4.4.20.0090.0174.84
4.4.10.0120.0174.85
4.4.00.0090.0294.78
4.3.110.0070.0204.68
4.3.100.0070.0224.68
4.3.90.0060.0194.66
4.3.80.0060.0294.66
4.3.70.0070.0184.66
4.3.60.0120.0174.66
4.3.50.0060.0194.65
4.3.40.0090.0254.61
4.3.30.0080.0183.43
4.3.20.0080.0183.41
4.3.10.0060.0193.37
4.3.00.0000.0277.29

preferences:
39.32 ms | 400 KiB | 5 Q