3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $name = 'a'; private $value = null; public function __construct() { $this->value = 1; } } class B { public $name = 'b'; private $differentValue = null; public function __construct() { $this->differentValue = 1; } } class CD { private $parent = null; public function __construct($parent) { $this->parent = new $parent; } public function __call($name, $params) { if ( is_callable(array($this->parent, $name)) ) { return call_user_func_array(array($this->parent, $name), $params); } else { throw new Exception('Method "'.$name.'" should be callable.'); } } public function __get($property_name){ if(isset($this->$property_name)) { return $this->$property_name; } elseif (isset($this->parent->$property_name)) { return $this->parent->$property_name; } else { return null; } } public function display() { echo "OK"; } } $c = new CD(new B); var_dump($c->name);

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.40.0070.00718.76
8.3.30.0130.00719.09
8.3.20.0020.00520.21
8.3.10.0000.00821.89
8.3.00.0000.00819.26
8.2.170.0120.00322.96
8.2.160.0090.00922.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0040.00419.82
8.2.110.0070.00322.21
8.2.100.0100.00317.78
8.2.90.0000.00817.91
8.2.80.0050.00220.30
8.2.70.0060.00317.63
8.2.60.0040.00417.50
8.2.50.0030.00617.55
8.2.40.0000.00719.48
8.2.30.0050.00319.20
8.2.20.0080.00017.68
8.2.10.0040.00418.07
8.2.00.0050.00317.70
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0140.00323.96
8.1.230.0110.00020.90
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0040.00417.36
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0040.00418.77
8.1.150.0040.00418.89
8.1.140.0050.00517.51
8.1.130.0000.00717.71
8.1.120.0040.00417.38
8.1.110.0040.00417.32
8.1.100.0000.00817.46
8.1.90.0030.00317.35
8.1.80.0050.00317.46
8.1.70.0030.00317.37
8.1.60.0060.00317.58
8.1.50.0040.00417.46
8.1.40.0000.01017.50
8.1.30.0030.00617.49
8.1.20.0060.00317.56
8.1.10.0030.00617.56
8.1.00.0000.00817.48
8.0.300.0040.00420.08
8.0.290.0030.00616.75
8.0.280.0030.00318.36
8.0.270.0030.00317.15
8.0.260.0030.00317.18
8.0.250.0070.00016.99
8.0.240.0000.00716.85
8.0.230.0040.00416.98
8.0.220.0050.00216.79
8.0.210.0000.00716.86
8.0.200.0070.00016.93
8.0.190.0040.00416.86
8.0.180.0000.00816.96
8.0.170.0080.00016.92
8.0.160.0070.00016.91
8.0.150.0040.00416.82
8.0.140.0040.00416.85
8.0.130.0080.00013.37
8.0.120.0040.00416.90
8.0.110.0000.00716.72
8.0.100.0030.00516.98
8.0.90.0040.00416.94
8.0.80.0070.01416.82
8.0.70.0030.00516.80
8.0.60.0040.00417.01
8.0.50.0040.00416.69
8.0.30.0140.00817.03
8.0.20.0090.01117.40
8.0.10.0000.00716.80
8.0.00.0110.00616.85
7.4.330.0000.00515.08
7.4.320.0060.00016.65
7.4.300.0060.00016.66
7.4.290.0040.00416.61
7.4.280.0030.00516.62
7.4.270.0030.00316.46
7.4.260.0030.00516.42
7.4.250.0040.00416.57
7.4.240.0030.00416.57
7.4.230.0070.00016.63
7.4.220.0160.00316.46
7.4.210.0050.01116.48
7.4.200.0000.00816.59
7.4.160.0080.00816.59
7.4.150.0060.01217.40
7.4.140.0100.01017.86
7.4.130.0050.01116.47
7.4.120.0110.00616.60
7.4.110.0110.00716.46
7.4.100.0150.00616.41
7.4.90.0080.00816.56
7.4.80.0110.01219.39
7.4.70.0030.01516.43
7.4.60.0120.00416.54
7.4.50.0030.00316.60
7.4.40.0120.00916.38
7.4.30.0190.00416.45
7.4.00.0070.00715.04
7.3.330.0000.00713.39
7.3.320.0120.00013.14
7.3.310.0030.00316.27
7.3.300.0030.00316.25
7.3.290.0090.00716.34
7.3.280.0100.00716.39
7.3.270.0080.00917.40
7.3.260.0100.00616.60
7.3.250.0120.00816.55
7.3.240.0070.01116.59
7.3.230.0080.01116.60
7.3.210.0060.01216.35
7.3.200.0100.01019.39
7.3.190.0090.01216.38
7.3.180.0090.00616.39
7.3.170.0080.00816.45
7.3.160.0140.00916.33
7.3.120.0030.01214.96
7.3.110.0060.01214.97
7.3.100.0030.00914.98
7.3.90.0040.00714.54
7.3.80.0120.00314.89
7.3.70.0030.00914.94
7.3.60.0060.00314.88
7.3.50.0120.00014.80
7.3.40.0030.01215.01
7.3.30.0090.00314.93
7.3.20.0060.00616.77
7.3.10.0060.00616.73
7.3.00.0100.00316.75
7.2.330.0090.00916.82
7.2.320.0090.00916.46
7.2.310.0120.00616.93
7.2.300.0110.00616.78
7.2.290.0100.01216.70
7.2.250.0030.01715.11
7.2.240.0070.01114.57
7.2.230.0100.00714.83
7.2.220.0090.00615.04
7.2.210.0090.00614.96
7.2.200.0030.00615.19
7.2.190.0030.01015.04
7.2.180.0100.00715.02
7.2.170.0040.01215.01
7.2.130.0000.01016.94
7.2.120.0060.00616.73
7.2.110.0000.01116.76
7.2.100.0030.00716.71
7.2.90.0090.00316.86
7.2.80.0080.00416.87
7.2.70.0000.01216.91
7.2.60.0130.00216.96
7.2.50.0000.00917.11
7.2.40.0030.00717.00
7.2.30.0070.00716.67
7.2.20.0060.00617.00
7.2.10.0060.00616.73
7.2.00.0070.00416.97
7.1.330.0070.01015.58
7.1.320.0040.01115.90
7.1.310.0030.01015.74
7.1.300.0090.00315.81
7.1.290.0040.01115.71
7.1.280.0000.01415.85
7.1.270.0030.00915.71
7.1.260.0070.00315.76
7.1.250.0000.01215.83
7.1.200.0040.01115.63
7.1.100.0000.00818.21
7.1.70.0030.00317.17
7.1.60.0040.02119.50
7.1.50.0070.01116.58
7.1.00.0030.07722.44
7.0.200.0130.00714.89
7.0.140.0070.07021.96
7.0.60.0230.07321.81
7.0.50.0030.04017.93
7.0.40.0030.09020.26
7.0.30.0330.08720.16
7.0.20.0300.08720.33
7.0.10.0030.05720.12
7.0.00.0130.07320.26
5.6.280.0100.06721.09
5.6.210.0070.03720.73
5.6.200.0030.04018.19
5.6.190.0030.04720.47
5.6.180.0300.07320.77
5.6.170.0300.05320.44
5.6.160.0070.08320.53
5.6.150.0000.04718.28
5.6.140.0030.06318.18
5.6.130.0030.04318.28
5.6.120.0030.09321.13
5.6.110.0030.06721.12
5.6.100.0130.04721.12
5.6.90.0030.08721.00
5.6.80.0130.07320.40
5.5.350.0230.04720.47
5.5.340.0230.06318.07
5.5.330.0030.08720.41
5.5.320.0270.05020.27
5.5.310.0230.08320.56
5.5.300.0100.04317.99
5.5.290.0030.05718.04
5.5.280.0000.09320.78
5.5.270.0100.08320.77
5.5.260.0200.02720.78
5.5.250.0170.07720.67
5.5.240.0100.03720.05
5.4.450.5070.03719.53
5.4.440.0030.08319.39
5.4.430.1700.07019.59
5.4.420.3900.04019.44
5.4.410.4730.04019.46
5.4.400.3970.03719.21
5.4.390.4030.04019.23
5.4.380.3930.04318.95
5.4.370.4070.03319.11
5.4.360.4530.03719.11
5.4.350.4900.03019.24
5.4.340.4000.03719.21
5.4.320.3900.03719.16
5.4.310.3700.03319.01
5.4.300.3870.03719.24
5.4.290.4070.03318.93
5.4.280.4170.03719.24
5.4.270.4030.04018.93
5.4.260.3800.03719.16
5.4.250.4170.04019.12
5.4.240.4300.03719.16
5.4.230.4600.03319.14
5.4.220.4200.03718.98
5.4.210.3930.02719.14
5.4.200.4330.03719.05
5.4.190.3670.03319.11
5.4.180.3770.04019.20
5.4.170.4000.03319.11
5.4.160.3830.03719.19
5.4.150.4000.04319.18
5.4.140.4800.03316.50
5.4.130.4800.03316.52
5.4.120.4800.03716.40
5.4.110.2270.03716.40
5.4.100.2730.03716.58
5.4.90.3300.03316.56
5.4.80.3330.03016.52
5.4.70.2900.04016.35
5.4.60.2230.03316.30
5.4.50.2830.03716.53
5.4.40.2530.03316.30
5.4.30.2870.03316.48
5.4.20.3170.03316.30
5.4.10.3970.03316.23
5.4.00.3970.03715.93
5.3.290.3930.04014.70
5.3.280.4100.04014.61
5.3.270.4270.04014.68
5.3.260.3830.04314.76
5.3.250.3770.03014.79
5.3.240.4570.03314.68
5.3.230.4430.03714.66
5.3.220.3900.03314.47
5.3.210.2570.03714.46
5.3.200.2400.03014.54
5.3.190.2730.04314.59
5.3.180.3400.04014.66
5.3.170.3600.03714.60
5.3.160.3170.04014.60
5.3.150.2270.04014.63
5.3.140.2700.03314.59
5.3.130.2870.04314.61
5.3.120.2770.04314.62
5.3.110.3700.03714.59
5.3.100.3730.04314.06
5.3.90.3970.04314.00
5.3.80.4070.04014.18
5.3.70.4100.03713.98
5.3.60.4900.04314.02
5.3.50.3930.03314.05
5.3.40.3930.03313.92
5.3.30.4230.03313.84
5.3.20.4400.04013.63
5.3.10.4270.04313.68
5.3.00.4230.03713.68
5.2.170.3230.02711.13
5.2.160.3470.03311.13
5.2.150.3600.03311.16
5.2.140.4070.02711.05
5.2.130.4030.02311.14
5.2.120.3730.03011.12
5.2.110.3500.02311.28
5.2.100.3730.03011.12
5.2.90.3830.02711.30
5.2.80.3770.02711.18
5.2.70.4000.03311.12
5.2.60.3770.02711.03
5.2.50.3470.03011.03
5.2.40.3300.03310.93
5.2.30.3400.02311.06
5.2.20.3430.03011.00
5.2.10.3300.02710.88
5.2.00.2670.03010.70
5.1.60.3370.0239.92
5.1.50.3270.0209.97
5.1.40.3100.0279.98
5.1.30.3170.02310.41
5.1.20.3000.02310.51
5.1.10.3030.02310.04
5.1.00.3370.02710.15
5.0.50.1570.0178.54
5.0.40.1300.0178.47
5.0.30.1300.0308.23
5.0.20.1470.0178.27
5.0.10.1430.0178.10
5.0.00.1130.0308.08
4.4.90.1600.0175.89
4.4.80.1930.0135.79
4.4.70.1630.0175.86
4.4.60.1870.0135.76
4.4.50.1830.0175.84
4.4.40.1670.0275.85
4.4.30.1830.0175.93
4.4.20.1900.0175.87
4.4.10.1530.0135.92
4.4.00.1370.0275.88
4.3.110.1370.0175.83
4.3.100.1230.0135.75
4.3.90.1270.0135.73
4.3.80.1800.0235.67
4.3.70.1770.0135.67
4.3.60.2130.0105.77
4.3.50.1700.0135.78
4.3.40.1430.0205.69
4.3.30.0930.0205.05
4.3.20.0670.0175.05
4.3.10.0730.0175.05
4.3.00.0900.0205.05

preferences:
34.7 ms | 400 KiB | 5 Q