3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Parent_Class { function __construct() { $x = $this->get_instance_schema(); } public function get_instance_schema() { return array( 'foo' => 1, ); } } class Child_Class extends Parent_Class { protected function get_instance_schema() { return array_merge( parent::get_instance_schema(), array( 'foo' => 1, ) ); } } $x = new Child_Class();

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)
7.1.30.0170.00734.38
7.1.20.0100.02034.39
7.1.10.0030.00716.17
7.1.00.0000.01316.37
7.0.170.0000.01015.74
7.0.160.0070.00715.99
7.0.150.0070.01015.95
7.0.140.0030.00715.80
7.0.130.0030.00716.18
7.0.120.0030.01016.19
7.0.110.0030.00716.23
7.0.100.0030.01016.04
7.0.90.0030.00716.04
7.0.80.0030.00716.15
7.0.70.0070.01016.08
7.0.60.0070.00715.95
7.0.50.0030.01716.13
7.0.40.0000.01316.25
7.0.30.0000.01316.25
7.0.20.0030.01016.33
7.0.10.0070.00716.19
7.0.00.0070.00716.36
5.6.300.0230.07020.88
5.6.290.0170.07320.80
5.6.280.0100.05320.69
5.6.270.0030.06020.71
5.6.260.0130.05020.97
5.6.250.0070.05720.84
5.6.240.0200.05320.78
5.6.230.0070.06020.68
5.6.220.0230.06720.62
5.6.210.0100.06020.79
5.6.200.0070.06020.65
5.6.190.0170.08720.64
5.6.180.0130.06320.79
5.6.170.0170.05320.79
5.6.160.0130.07020.69
5.6.150.0130.06020.79
5.6.140.0130.05320.83
5.6.130.0070.06020.93
5.6.120.0170.07720.76
5.6.110.0130.07720.63
5.6.100.0070.06320.65
5.6.90.0200.07020.82
5.6.80.0200.06320.21
5.6.70.0170.06720.28
5.6.60.0070.06020.17
5.6.50.0100.07320.21
5.6.40.0070.06320.22
5.6.30.0070.08720.00
5.6.20.0100.07320.00
5.6.10.0070.08320.15
5.6.00.0170.05019.99
5.5.380.0130.05017.32
5.5.370.0130.06317.42
5.5.360.0030.06317.31
5.5.350.0100.06017.33
5.5.340.0100.06017.85
5.5.330.0130.06317.86
5.5.320.0100.06317.87
5.5.310.0130.07717.87
5.5.300.0000.06317.86
5.5.290.0170.06017.63
5.5.280.0070.06317.96
5.5.270.0170.05017.73
5.5.260.0170.06017.75
5.5.250.0000.07017.68
5.5.240.0170.05317.02
5.5.230.0130.07017.08
5.5.220.0000.06017.14
5.5.210.0170.06717.21
5.5.200.0100.05017.22
5.5.190.0270.07017.23
5.5.180.0170.07317.02
5.5.160.0200.06316.99
5.5.150.0100.05317.02
5.5.140.0100.05317.20
5.5.130.0070.05017.18
5.5.120.0070.05717.21
5.5.110.0030.05717.06
5.5.100.0070.05317.18
5.5.90.0170.06017.18
5.5.80.0130.05717.01
5.5.70.0270.03317.09
5.5.60.0170.04017.07
5.5.50.0100.05316.91
5.5.40.0070.05717.08
5.5.30.0230.05317.11
5.5.20.0070.05716.91
5.5.10.0170.04317.17
5.5.00.0070.08017.10
5.4.450.0200.06319.17
5.4.440.0270.05719.09
5.4.430.0130.05719.07
5.4.420.0130.05319.34
5.4.410.0130.05319.19
5.4.400.0130.05718.75
5.4.390.0200.06018.84
5.4.380.0100.06718.80
5.4.370.0070.07019.01
5.4.360.0030.07719.00
5.4.350.0170.06719.01
5.4.340.0100.06719.00
5.4.320.0070.05718.90
5.4.310.0100.05318.75
5.4.300.0000.07018.70
5.4.290.0200.06019.00
5.4.280.0070.07718.79
5.4.270.0130.04318.94
5.4.260.0070.05018.99
5.4.250.0130.05018.95
5.4.240.0070.05318.95
5.4.230.0100.05319.00
5.4.220.0170.06019.02
5.4.210.0130.05018.83
5.4.200.0170.06018.84
5.4.190.0170.04718.62
5.4.180.0100.06318.99
5.4.170.0130.05018.83
5.4.160.0170.04318.97
5.4.150.0070.06018.95
5.4.140.0270.05016.42
5.4.130.0200.05016.41
5.4.120.0030.05316.44
5.4.110.0030.06016.44
5.4.100.0100.04716.53
5.4.90.0100.04316.71
5.4.80.0170.03716.66
5.4.70.0000.05316.69
5.4.60.0170.03716.60
5.4.50.0070.05016.30
5.4.40.0070.04716.64
5.4.30.0070.04716.38
5.4.20.0000.05316.50
5.4.10.0070.05316.54
5.4.00.0070.05715.86
5.3.290.0070.05714.80
5.3.280.0030.05714.78
5.3.270.0070.06314.60
5.3.260.0070.05314.58
5.3.250.0100.07014.75
5.3.240.0000.06014.60
5.3.230.0070.06314.78
5.3.220.0070.05314.57
5.3.210.0030.05314.40
5.3.200.0130.04314.61
5.3.190.0100.04714.59
5.3.180.0130.04314.40
5.3.170.0100.06314.66
5.3.160.0000.05714.47
5.3.150.0030.05314.70
5.3.140.0100.05014.57
5.3.130.0170.04014.46
5.3.120.0070.05314.72
5.3.110.0070.05014.62
5.3.100.0100.04714.26
5.3.90.0070.05013.85
5.3.80.0000.05314.11
5.3.70.0030.05014.20
5.3.60.0000.05714.07
5.3.50.0070.05013.97
5.3.40.0070.05714.04
5.3.30.0170.04013.98
5.3.20.0030.05313.61
5.3.10.0070.04713.87
5.3.00.0000.05313.82
5.2.170.0030.04311.22
5.2.160.0030.04011.32
5.2.150.0070.04311.21
5.2.140.0170.04011.05
5.2.130.0070.04011.07
5.2.120.0130.03011.26
5.2.110.0000.04311.19
5.2.100.0070.04011.18
5.2.90.0070.04011.32
5.2.80.0130.03311.18
5.2.70.0070.05711.00
5.2.60.0170.04310.95
5.2.50.0100.03710.99
5.2.40.0130.03011.09
5.2.30.0130.03311.07
5.2.20.0000.05711.04
5.2.10.0130.03711.02
5.2.00.0100.04710.71
5.1.60.0070.03310.05
5.1.50.0030.03710.04
5.1.40.0070.0409.94
5.1.30.0070.03710.43
5.1.20.0030.03710.43
5.1.10.0130.0339.91
5.1.00.0070.05010.17
5.0.50.0030.0338.61
5.0.40.0070.0278.40
5.0.30.0030.0438.23
5.0.20.0030.0308.39
5.0.10.0000.0308.41
5.0.00.0070.0438.31
4.4.90.0070.0277.08
4.4.80.0130.0177.08
4.4.70.0000.0237.08
4.4.60.0070.0237.08
4.4.50.0030.0237.08
4.4.40.0030.0407.08
4.4.30.0070.0277.08
4.4.20.0070.0277.08
4.4.10.0030.0307.08
4.4.00.0030.0407.08
4.3.110.0030.0237.08
4.3.100.0000.0237.08
4.3.90.0000.0237.08
4.3.80.0030.0477.08
4.3.70.0030.0237.08
4.3.60.0070.0207.08
4.3.50.0000.0277.08
4.3.40.0030.0377.08
4.3.30.0000.0237.08
4.3.20.0030.0207.08
4.3.10.0030.0207.08
4.3.00.0030.0207.08

preferences:
133.66 ms | 1428 KiB | 7 Q