3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class AbstractEvent { protected $id; private $hidden; } class Event extends AbstractEvent implements JsonSerializable { private $value; public function jsonSerialize() { return get_object_vars(); } } $e = new Event(); echo json_serialize($event);

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.3.10.0090.00016.48
7.3.00.0060.00316.48
7.2.130.0090.00416.56
7.2.120.0060.00616.89
7.2.110.0090.00316.79
7.2.100.0070.01016.89
7.2.90.0120.00316.88
7.2.80.0100.00317.00
7.2.70.0000.00816.92
7.2.60.0040.00616.60
7.2.50.0070.00716.42
7.2.40.0060.00316.56
7.2.30.0000.01716.80
7.2.20.0030.01016.68
7.2.10.0080.00816.71
7.2.00.0080.01117.93
7.1.250.0090.00315.42
7.1.200.0090.00015.69
7.1.100.0090.00317.88
7.1.70.0060.00916.87
7.1.60.0040.01819.27
7.1.50.0070.01816.89
7.1.00.0030.07722.37
7.0.200.0090.00316.75
7.0.60.0130.06719.90
7.0.50.0070.07317.96
7.0.40.0100.08320.01
7.0.30.0230.04720.32
7.0.20.0430.07020.13
7.0.10.0030.04720.25
7.0.00.0070.04020.10
5.6.280.0000.03321.15
5.6.210.0130.07720.49
5.6.200.0070.08718.17
5.6.190.0070.04020.60
5.6.180.0170.04320.39
5.6.170.0330.05020.54
5.6.160.0130.07720.55
5.6.150.0070.08318.21
5.6.140.0170.06718.11
5.6.130.0070.06718.18
5.6.120.0130.06021.02
5.6.110.0030.07321.14
5.6.100.0170.05721.14
5.6.90.0100.08321.12
5.6.80.0070.08320.38
5.6.70.3230.03720.38
5.5.350.0100.09320.39
5.5.340.0100.07717.95
5.5.330.0030.05020.22
5.5.320.0230.04020.40
5.5.310.0300.07320.35
5.5.300.0070.05317.95
5.5.290.0000.05018.09
5.5.280.0000.04320.73
5.5.270.0100.08020.75
5.5.260.0030.04320.79
5.5.250.0030.08720.70
5.5.240.0030.07320.19
5.4.450.0670.05319.31
5.4.440.0670.05319.44
5.4.430.0670.05719.46
5.4.420.0730.04719.30
5.4.410.0730.06319.18
5.4.400.0530.05719.14
5.4.390.0730.06019.37
5.4.380.0500.06019.30
5.4.370.0800.05319.13
5.4.360.0700.05319.15
5.4.350.0970.05719.24
5.4.340.0600.06019.01
5.4.320.0570.07019.23
5.4.310.0730.05718.87
5.4.300.0630.05718.98
5.4.290.0830.05319.14
5.4.280.0600.05319.30
5.4.270.0700.05019.01
5.4.260.0700.05719.37
5.4.250.0730.05019.01
5.4.240.0300.06018.86
5.4.230.0100.06319.11
5.4.220.0130.06019.14
5.4.210.0200.04719.28
5.4.200.0870.04719.05
5.4.190.0900.05718.97
5.4.180.0900.05319.00
5.4.170.0930.04719.21
5.4.160.0900.04319.26
5.4.150.0770.05319.13
5.4.140.0970.05016.34
5.4.130.0870.04716.39
5.4.120.0770.05316.50
5.4.110.1200.05716.51
5.4.100.0930.04316.57
5.4.90.0770.07016.66
5.4.80.0970.03716.50
5.4.70.0270.06316.17
5.4.60.0230.05716.53
5.4.50.0070.04016.38
5.4.40.0070.07316.34
5.4.30.0070.06016.52
5.4.20.0000.08016.48
5.3.290.3270.03315.82
5.3.280.3530.03715.82
5.3.270.3100.04015.84
5.3.260.3830.03314.83
5.3.250.0170.04014.52
5.3.240.2730.04314.83
5.3.230.3970.04014.56
5.3.220.3200.03314.49
5.3.210.0170.03314.64
5.3.200.0230.05014.68
5.3.190.0200.04314.48
5.3.180.0170.05014.46