3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { private $foo; public function __construct() { $this->foo = "base foo"; } public final function getFoo() { var_dump($this); return $this->foo; } } class Derived extends Base { public $foo; public function __construct($type) { parent::__construct(); $this->foo = "derived foo"; $this->somethingUndefined = "dynamically declared"; } } $base = new Base(); var_dump($base->getFoo()); $derived = new Derived(0); var_dump($derived->getFoo()); $clonedDerived = clone $derived; var_dump($clonedDerived->getFoo());

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)
8.3.60.0190.00317.00
8.3.50.0150.00821.14
8.3.40.0030.01318.85
8.3.30.0040.01118.79
8.3.20.0060.00318.75
8.3.10.0080.00021.59
8.3.00.0040.00417.88
8.2.180.0180.00318.14
8.2.170.0090.00622.96
8.2.160.0090.00920.84
8.2.150.0190.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00819.54
8.2.120.0080.00026.35
8.2.110.0070.00319.27
8.2.100.0070.00717.78
8.2.90.0000.00919.14
8.2.80.0050.00319.13
8.2.70.0060.00317.63
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0080.00019.76
8.2.30.0000.00817.97
8.2.20.0040.00417.58
8.2.10.0070.00018.00
8.2.00.0040.00418.05
8.1.280.0070.00725.92
8.1.270.0040.00423.96
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00622.07
8.1.230.0080.00318.99
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0050.00317.21
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0070.00021.91
8.1.150.0000.00720.64
8.1.140.0050.00219.48
8.1.130.0040.00417.65
8.1.120.0040.00417.36
8.1.110.0030.00617.30
8.1.100.0000.00817.45
8.1.90.0080.00017.29
8.1.80.0000.00717.47
8.1.70.0030.00317.40
8.1.60.0040.00417.56
8.1.50.0040.00417.60
8.1.40.0000.00717.43
8.1.30.0030.00617.55
8.1.20.0040.00417.63
8.1.10.0000.00817.41
8.1.00.0000.00917.39
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0070.00018.32
8.0.270.0030.00316.77
8.0.260.0030.00317.21
8.0.250.0000.00716.84
8.0.240.0000.00716.80
8.0.230.0030.00316.84
8.0.220.0060.00316.85
8.0.210.0050.00316.90
8.0.200.0030.00316.84
8.0.190.0040.00416.88
8.0.180.0000.00816.84
8.0.170.0000.00716.91
8.0.160.0000.00716.87
8.0.150.0040.00416.86
8.0.140.0030.00516.82
8.0.130.0000.00613.32
8.0.120.0050.00316.70
8.0.110.0030.00516.83
8.0.100.0030.00516.86
8.0.90.0080.00016.82
8.0.80.0040.01116.85
8.0.70.0050.00316.84
8.0.60.0000.00816.92
8.0.50.0000.00816.80
8.0.30.0090.00817.03
8.0.20.0110.01117.40
8.0.10.0030.00617.01
8.0.00.0110.00716.79
7.4.330.0050.00015.08
7.4.320.0060.00016.45
7.4.300.0000.00616.54
7.4.290.0050.00316.66
7.4.280.0050.00316.63
7.4.270.0000.00716.57
7.4.260.0000.00716.61
7.4.250.0080.00016.58
7.4.240.0030.00516.59
7.4.230.0030.00316.70
7.4.220.0060.01916.63
7.4.210.0070.00716.47
7.4.200.0030.00316.33
7.4.160.0120.00316.35
7.4.150.0150.00317.40
7.4.140.0150.00717.86
7.4.130.0080.01116.62
7.4.120.0110.00616.59
7.4.110.0100.00716.48
7.4.100.0030.01416.32
7.4.90.0090.00916.53
7.4.80.0180.00619.39
7.4.70.0090.00916.61
7.4.60.0130.00316.46
7.4.50.0000.01116.51
7.4.40.0030.01516.29
7.4.30.0130.00316.53
7.4.00.0060.00614.86
7.3.330.0000.00813.29
7.3.320.0030.00313.32
7.3.310.0070.00016.36
7.3.300.0000.00616.26
7.3.290.0000.00716.29
7.3.280.0080.01016.32
7.3.270.0110.00717.40
7.3.260.0140.00516.25
7.3.250.0120.01016.47
7.3.240.0110.00916.51
7.3.230.0090.01516.39
7.3.210.0070.01116.48
7.3.200.0030.01319.39
7.3.190.0090.00916.30
7.3.180.0060.01116.12
7.3.170.0090.00616.29
7.3.160.0150.00016.36
7.3.10.0060.00316.41
7.3.00.0060.00316.56
7.2.330.0030.01816.70
7.2.320.0080.00816.60
7.2.310.0090.00916.60
7.2.300.0110.00516.77
7.2.290.0120.00616.43
7.2.130.0090.00616.78
7.2.120.0060.00616.92
7.2.110.0070.01016.73
7.2.100.0050.00516.90
7.2.90.0040.01117.05
7.2.80.0090.00616.92
7.2.70.0090.00616.84
7.2.60.0100.00416.59
7.2.50.0080.01116.71
7.2.40.0030.00716.78
7.2.30.0090.00616.86
7.2.20.0030.01016.55
7.2.10.0060.00616.91
7.2.00.0080.00618.05
7.1.250.0070.00715.39
7.1.200.0030.01215.65
7.1.100.0040.00817.96
7.1.70.0040.00417.04
7.1.60.0100.01419.33
7.1.50.0030.01717.03
7.1.00.0100.07022.30
7.0.200.0030.00716.79
7.0.100.0370.08020.18
7.0.90.0300.05719.95
7.0.80.0400.07019.97
7.0.70.0330.08019.88
7.0.60.0430.07719.96
7.0.50.0330.04720.34
7.0.40.0170.04020.04
7.0.30.0230.06020.09
7.0.20.0030.05320.18
7.0.10.0100.08020.04
7.0.00.0070.08719.99
5.6.280.0030.07321.13
5.6.250.0030.05320.67
5.6.240.0100.08720.70
5.6.230.0130.08320.59
5.6.220.0130.04020.62
5.6.210.0230.06720.57
5.6.200.0070.04321.02
5.6.190.0100.08321.08
5.6.180.0030.08721.05
5.6.170.0200.07321.11
5.6.160.0200.05021.18
5.6.150.0030.08321.05
5.6.140.0030.09321.09
5.6.130.0170.07320.96
5.6.120.0070.06021.08
5.6.110.0100.08321.05
5.6.100.0070.08321.04
5.6.90.0030.08720.97
5.6.80.0030.08320.44
5.6.70.0070.05720.31
5.6.60.0170.07320.31
5.6.50.0130.07720.47
5.6.40.0030.07320.36
5.6.30.0100.07720.43
5.6.20.0070.07720.41
5.6.10.0100.06720.32
5.6.00.0030.08720.43
5.5.380.0030.07720.57
5.5.370.0100.08020.49
5.5.360.0070.08720.49
5.5.350.0130.07020.44
5.5.340.0030.08720.84
5.5.330.0030.06320.90
5.5.320.0070.04720.89
5.5.310.0130.07320.81
5.5.300.0030.06720.64
5.5.290.0030.04720.93
5.5.280.0130.07020.88
5.5.270.0070.08720.83
5.5.260.0030.09020.91
5.5.250.0030.08720.59
5.5.240.0030.08320.28
5.5.230.0170.07720.03
5.5.220.0100.06020.29
5.5.210.0030.08720.29
5.5.200.0400.04320.27
5.5.190.0000.08720.16
5.5.180.0030.07320.25
5.5.160.0070.08320.16
5.5.150.0100.07320.13
5.5.140.0070.07320.28
5.5.130.0030.08020.27
5.5.120.0100.07720.00
5.5.110.0130.07320.13
5.5.100.0070.08720.09
5.5.90.0030.06320.07
5.5.80.0200.06320.10
5.5.70.0100.06320.10
5.5.60.0100.06020.06
5.5.50.0100.07720.15
5.5.40.0070.07720.11
5.5.30.0100.05020.02
5.5.20.0070.08320.06
5.5.10.0070.08020.01
5.5.00.0100.06720.04

preferences:
58.8 ms | 401 KiB | 5 Q