3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Derp; abstract class A { public $stuff = array(); abstract public function __construct(); } class B extends A { protected $kids; protected $log; //public $stuff; public function __construct() { //$this->bee(); } public function bee() { $this->kids = new C($this); $this->kids->cee(); } public function updateLog($msg) { $this->log[] = $msg; } } class C //extends A { public $Cups = "cCup"; //public $stuff; public function __construct($b) { //$this->bee(); $this->Cups = $b; } public function cee() { $this->stuff = array("MyStuff"); $this->Cups->updateLog("This"); $this->Cups->updateLog("That"); } } $b = new B(); $x = $b->bee();

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.70.0100.01018.43
8.3.60.0110.00718.81
8.3.50.0130.00922.17
8.3.40.0140.00318.84
8.3.30.0080.00619.01
8.3.20.0050.00220.14
8.3.10.0080.00023.53
8.3.00.0060.00319.07
8.2.190.0120.00316.58
8.2.180.0070.00716.38
8.2.170.0090.00622.96
8.2.160.0030.01022.31
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00221.09
8.2.110.0080.00022.14
8.2.100.0060.00617.72
8.2.90.0080.00419.28
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0040.00418.04
8.2.50.0070.00318.07
8.2.40.0000.00718.03
8.2.30.0000.00818.13
8.2.20.0040.00417.63
8.2.10.0040.00417.95
8.2.00.0040.00417.71
8.1.280.0130.00625.92
8.1.270.0040.00419.01
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.69
8.1.230.0070.00419.11
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0110.00017.35
8.1.190.0040.00417.11
8.1.180.0030.00518.10
8.1.170.0030.00818.40
8.1.160.0030.00521.95
8.1.150.0040.00418.71
8.1.140.0020.00517.31
8.1.130.0030.00317.71
8.1.120.0030.00517.45
8.1.110.0000.00817.41
8.1.100.0000.00717.36
8.1.90.0030.00517.36
8.1.80.0050.00217.39
8.1.70.0040.00417.43
8.1.60.0000.00817.46
8.1.50.0000.00817.56
8.1.40.0040.00417.41
8.1.30.0030.00617.63
8.1.20.0040.00417.65
8.1.10.0050.00217.49
8.1.00.0000.00717.51
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0000.00818.29
8.0.270.0000.00717.25
8.0.260.0030.00317.25
8.0.250.0030.00316.91
8.0.240.0000.00716.86
8.0.230.0040.00416.89
8.0.220.0040.00416.90
8.0.210.0000.00716.88
8.0.200.0030.00316.83
8.0.190.0040.00416.91
8.0.180.0000.00816.79
8.0.170.0040.00416.93
8.0.160.0030.00316.80
8.0.150.0070.00016.87
8.0.140.0070.00016.82
8.0.130.0050.00013.19
8.0.120.0030.00616.78
8.0.110.0050.00316.90
8.0.100.0050.00316.66
8.0.90.0030.00316.87
8.0.80.0110.00716.77
8.0.70.0070.00016.79
8.0.60.0080.00016.90
8.0.50.0030.00616.72
8.0.30.0080.01617.15
8.0.20.0150.00417.40
8.0.10.0050.00516.92
8.0.00.0110.00716.61
7.4.330.0020.00215.08
7.4.320.0000.00616.35
7.4.300.0070.00016.46
7.4.290.0030.00316.55
7.4.280.0000.00716.48
7.4.270.0070.00316.53
7.4.260.0070.00016.39
7.4.250.0000.00816.40
7.4.240.0000.00716.56
7.4.230.0000.00716.59
7.4.220.0090.01016.43
7.4.210.0110.00316.68
7.4.200.0050.00316.60
7.4.160.0120.00416.61
7.4.150.0040.01917.40
7.4.140.0060.01317.86
7.4.130.0100.00816.52
7.4.120.0100.00716.46
7.4.110.0130.00616.50
7.4.100.0120.00916.39
7.4.90.0030.01516.36
7.4.80.0120.00919.39
7.4.70.0060.01516.60
7.4.60.0070.01016.50
7.4.50.0000.00816.28
7.4.40.0090.00616.16
7.4.30.0120.00616.42
7.4.00.0100.00014.63
7.3.330.0000.00713.31
7.3.320.0060.00013.15
7.3.310.0030.00316.15
7.3.300.0000.00616.17
7.3.290.0030.01316.29
7.3.280.0090.01016.31
7.3.270.0140.00517.40
7.3.260.0120.00616.58
7.3.250.0090.00816.40
7.3.240.0070.01016.53
7.3.230.0040.01416.39
7.3.210.0100.00716.27
7.3.200.0070.01019.39
7.3.190.0100.00716.62
7.3.180.0080.00816.68
7.3.170.0100.00716.38
7.3.160.0160.00416.21
7.2.330.0040.01816.68
7.2.320.0060.01016.59
7.2.310.0100.01316.71
7.2.300.0090.00616.71
7.2.290.0030.01516.41
7.2.00.0090.00919.30
7.1.100.0070.00418.05
7.1.70.0030.00617.02
7.1.60.0140.01119.46
7.1.50.0120.01216.82
7.1.00.0100.07022.30
7.0.200.0040.00416.77
7.0.140.0100.04722.18
7.0.60.0130.04720.01
7.0.50.0030.08017.92
7.0.40.0170.07720.10
7.0.30.0200.04320.23
7.0.20.0300.08020.15
7.0.10.0100.08720.12
7.0.00.0030.05320.33
5.6.280.0100.06721.13
5.6.210.0070.08020.66
5.6.200.0100.06018.19
5.6.190.0030.04720.61
5.6.180.0300.05020.33
5.6.170.0230.07720.45
5.6.160.0230.04720.54
5.6.150.0130.06318.18
5.6.140.0130.07718.16
5.6.130.0030.08018.26
5.6.120.0030.08320.98
5.6.110.0100.08020.98
5.6.100.0030.06721.01
5.6.90.0000.04721.19
5.6.80.0100.08020.38
5.5.350.4070.04720.37
5.5.340.0030.04018.02
5.5.330.0100.03720.45
5.5.320.0170.04720.30
5.5.310.0300.07720.24
5.5.300.0070.06018.04
5.5.290.0030.05318.01
5.5.280.0070.08320.66
5.5.270.0030.04020.78
5.5.260.0130.04020.89
5.5.250.0170.06320.63
5.5.240.0030.07720.28
5.4.450.0970.05019.31
5.4.440.0100.06019.28
5.4.430.0170.05719.63
5.4.420.0170.07719.50
5.4.410.0170.05019.18
5.4.400.0230.04319.23
5.4.390.0300.04718.61
5.4.380.0270.05318.73
5.4.370.0230.05318.47
5.4.360.0270.04718.73
5.4.350.0370.05318.78
5.4.340.0300.04318.78
5.4.320.0270.04718.58
5.4.310.0170.05718.78
5.4.300.0170.05718.50
5.4.290.0230.05318.75
5.4.280.0200.05718.60
5.4.270.0300.07018.70
5.4.260.0170.06018.50
5.4.250.0230.05318.73
5.4.240.0300.04718.58
5.4.230.0200.05318.72
5.4.220.0270.05018.73
5.4.210.0270.05018.78
5.4.200.0200.05716.79
5.4.190.0230.05018.75
5.4.180.0300.05718.73
5.4.170.0170.06018.71
5.4.160.0270.04718.71
5.4.150.0170.05718.45
5.4.140.0230.05316.38
5.4.130.0200.05016.20
5.4.120.0230.04716.29
5.4.110.0200.05016.20
5.4.100.0200.05316.22
5.4.90.0200.05716.23
5.4.80.0230.04716.31
5.4.70.0300.04016.16
5.4.60.0230.04716.42
5.4.50.0230.06016.41
5.4.40.0200.05016.24
5.4.30.0270.05316.30
5.4.20.0270.04316.40
5.4.10.0300.05016.18
5.4.00.0170.05315.87
5.3.290.0230.05714.71
5.3.280.0170.06014.66
5.3.270.0400.04714.64
5.3.260.0130.06014.61
5.3.250.0270.05014.74
5.3.240.0130.06014.66
5.3.230.0230.05014.65
5.3.220.0230.05014.60
5.3.210.0170.05714.64
5.3.200.0200.05714.76
5.3.190.0070.06314.69
5.3.180.0300.04314.63
5.3.170.0230.05314.70
5.3.160.0200.05314.68
5.3.150.0200.05314.57
5.3.140.0170.05314.77
5.3.130.0300.05014.78
5.3.120.0230.05714.61
5.3.110.0230.05314.62
5.3.100.0230.05314.11
5.3.90.0170.05714.18
5.3.80.0300.04314.16
5.3.70.0200.05314.01
5.3.60.0270.04714.04
5.3.50.0200.05014.13
5.3.40.0200.05314.02
5.3.30.0200.05013.96
5.3.20.0270.04313.88
5.3.10.0200.05313.65
5.3.00.0130.05713.88
5.2.170.0130.04711.13
5.2.160.0130.04311.09
5.2.150.0230.03711.13
5.2.140.0130.04711.20
5.2.130.0200.04011.15
5.2.120.0200.03711.08
5.2.110.0200.03711.07
5.2.100.0230.03011.14
5.2.90.0200.03711.26
5.2.80.0100.04711.15
5.2.70.0200.04011.06
5.2.60.0130.04311.03
5.2.50.0200.03711.05
5.2.40.0130.04011.04
5.2.30.0200.03711.03
5.2.20.0170.03710.93
5.2.10.0170.03710.92
5.2.00.0130.04010.77
5.1.60.0100.03710.05
5.1.50.0170.03010.05
5.1.40.0170.03010.03
5.1.30.0100.04010.47
5.1.20.0130.03710.37
5.1.10.0200.03010.04
5.1.00.0130.03710.12
5.0.50.0100.0278.57
5.0.40.0100.0238.42
5.0.30.0100.0438.24
5.0.20.0070.0278.32
5.0.10.0130.0238.20
5.0.00.0100.0408.35
4.4.90.0100.0175.88
4.4.80.0070.0205.85
4.4.70.0100.0205.85
4.4.60.0070.0205.89
4.4.50.0070.0205.92
4.4.40.0030.0375.91
4.4.30.0070.0235.87
4.4.20.0070.0205.96
4.4.10.0030.0235.88
4.4.00.0100.0335.85
4.3.110.0030.0235.83
4.3.100.0070.0205.75
4.3.90.0170.0175.80
4.3.80.0070.0335.82
4.3.70.0030.0235.80
4.3.60.0070.0205.84
4.3.50.0070.0205.77
4.3.40.0030.0375.77
4.3.30.0070.0204.56
4.3.20.0000.0274.59
4.3.10.0000.0234.54
4.3.00.0130.0207.18

preferences:
45.93 ms | 401 KiB | 5 Q