3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Testing shutdown sequence function shutdown() { echo "register_shutdown_function\n"; } register_shutdown_function('shutdown'); class MyClass { function __destruct() { echo "Object destructor\n"; } } function obcallback($buffer) { $buffer .= "Output buffer callback\n"; return $buffer; } ob_start('obcallback'); $myObject = new MyClass; function dummy() { } function sessionclose() { echo "Session close\n"; } function sessionwrite() { echo "Session write\n"; } session_set_save_handler('dummy','sessionclose','dummy','sessionwrite','dummy','dummy'); session_start();

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.01417.00
7.2.00.0030.00919.20
7.1.200.0060.00315.29
7.1.100.0000.01317.61
7.1.70.0000.00716.92
7.1.60.0040.02119.40
7.1.50.0040.00716.90
7.1.00.0030.04022.43
7.0.200.0000.01216.80
7.0.140.0030.07022.04
7.0.60.1900.07720.07
7.0.50.0100.07717.98
7.0.40.0100.07320.23
7.0.30.0270.08020.26
7.0.20.0330.06720.19
7.0.10.0130.08020.33
7.0.00.0170.05020.15
5.6.280.0100.07020.78
5.6.210.0070.08020.75
5.6.200.0070.03718.15
5.6.190.0100.08720.50
5.6.180.0400.04320.77
5.6.170.0230.03720.44
5.6.160.0130.05320.46
5.6.150.0100.04018.18
5.6.140.0100.07018.27
5.6.130.0070.04318.13
5.6.120.0130.07021.00
5.6.110.0170.07321.08
5.6.100.0070.08021.12
5.6.90.0100.08020.96
5.6.80.0070.08320.52
5.5.350.0170.05020.31
5.5.340.0030.05318.02
5.5.330.0130.03720.42
5.5.320.0230.04020.33
5.5.310.0200.04020.30
5.5.300.0100.07718.04
5.5.290.0030.04017.96
5.5.280.0100.07320.94
5.5.270.0100.08320.84
5.5.260.0070.05720.85
5.5.250.0070.06720.50
5.5.240.0070.07020.36
5.4.450.4730.04019.53
5.4.440.4400.03319.52
5.4.430.4630.04019.30
5.4.420.4400.03719.45
5.4.410.4030.04719.14
5.4.400.4570.04318.86
5.4.390.4070.04019.15
5.4.380.3200.04018.95
5.4.370.3730.03719.20
5.4.360.3630.04319.09
5.4.350.4230.03719.09
5.4.340.3100.04718.99
5.4.320.4130.04019.09
5.4.310.4170.04019.05
5.4.300.4570.03319.14
5.4.290.4670.03719.19
5.4.280.4730.03719.13
5.4.270.4270.03719.13
5.4.260.4570.04319.10
5.4.250.4170.03718.87
5.4.240.4270.03719.31
5.4.230.4200.04019.21
5.4.220.4070.03318.98
5.4.210.5570.02719.15
5.4.200.4100.03719.14
5.4.190.4330.04019.07
5.4.180.3970.03719.08
5.4.170.0070.07719.07
5.4.160.0970.06319.21
5.4.150.4030.04319.21
5.4.140.4600.03316.72
5.4.130.4270.03716.40
5.4.120.3230.03716.55
5.4.110.4630.03716.42
5.4.100.4300.03316.63
5.4.90.4670.02716.46
5.4.80.3900.02716.29
5.4.70.0070.06316.44
5.4.60.0030.07016.16
5.4.50.4730.03316.54
5.4.40.4370.03716.25
5.4.30.4670.03716.52
5.4.20.4270.03716.51
5.4.10.4330.03316.16
5.4.00.3730.03016.12
5.3.290.3630.04014.90
5.3.280.3700.04014.83
5.3.270.0870.05314.67
5.3.260.4300.03714.70
5.3.250.4130.04014.59
5.3.240.4730.03014.62
5.3.230.4330.03014.77
5.3.220.4130.03014.80
5.3.210.4630.03314.65
5.3.200.4600.03314.55
5.3.190.4000.03314.65
5.3.180.3900.03714.67
5.3.170.4570.03314.50
5.3.160.0070.06314.54
5.3.150.2300.06314.64
5.3.140.4700.03314.48
5.3.130.4500.03714.67
5.3.120.4500.04314.78
5.3.110.4300.04014.57
5.3.100.4430.04014.03
5.3.90.4500.04014.03
5.3.80.4300.04714.00
5.3.70.3900.04014.19
5.3.60.3900.04014.19
5.3.50.3970.03713.84
5.3.40.3830.04014.04
5.3.30.3830.04013.94
5.3.20.3870.04013.78
5.3.10.4330.03313.57
5.3.00.4830.03313.62
5.2.170.3100.03011.24
5.2.160.3500.02711.38
5.2.150.3530.03311.09
5.2.140.3430.03311.07
5.2.130.3470.03011.07
5.2.120.3970.03011.02
5.2.110.3630.03711.08
5.2.100.3670.02311.09
5.2.90.4000.03311.23
5.2.80.3770.02011.02
5.2.70.3470.03011.19
5.2.60.3600.02711.04
5.2.50.3870.03711.03
5.2.40.3170.02711.01
5.2.30.3330.02310.93
5.2.20.3230.02711.08
5.2.10.3100.03010.95
5.2.00.2830.02310.68
5.1.60.2870.0239.96
5.1.50.2830.02710.16
5.1.40.2530.02310.07
5.1.30.2970.02710.46
5.1.20.3100.02710.28
5.1.10.3230.0279.97
5.1.00.3770.0209.97
5.0.50.1870.0209.96
5.0.40.1500.0239.96
5.0.30.1270.0309.96
5.0.20.0970.0179.96
5.0.10.1270.0179.96
5.0.00.1200.0339.96
4.4.90.1630.0179.96
4.4.80.1870.0179.96
4.4.70.1000.0179.96
4.4.60.1630.0209.96
4.4.50.1930.0139.96
4.4.40.1630.0279.96
4.4.30.1670.0139.96
4.4.20.1530.0139.96
4.4.10.1570.0179.96
4.4.00.1600.0209.96
4.3.110.1330.0179.96
4.3.100.0930.0179.96
4.3.90.0600.0209.96
4.3.80.1170.0279.96
4.3.70.1200.0179.96
4.3.60.1200.0179.96
4.3.50.1470.0179.96
4.3.40.1270.0239.96
4.3.30.0630.0139.96
4.3.20.0600.0179.96
4.3.10.0630.0139.96
4.3.00.0630.0179.96