3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends ArrayObject { public $public; private $private; protected $protected; public function __construct ($input = array()) { parent::__construct($input, ArrayObject::ARRAY_AS_PROPS); } } class B extends ArrayObject { public $public; private $private; protected $protected; public function __construct ($input = array()) { } } class C extends ArrayObject { public $public; private $private; protected $protected; public function __construct ($input = array()) { parent::__construct($input, ArrayObject::STD_PROP_LIST); } } class D extends ArrayObject { public function __construct ($input = array()) { parent::__construct($input, ArrayObject::STD_PROP_LIST); } } class E extends ArrayObject { public function __construct ($input = array()) { parent::__construct($input, ArrayObject::ARRAY_AS_PROPS); } } $input = array('public' => 'test', 'private' => 'test', 'protected' => 'test'); $os = array( 'a' => new A($input), 'b' => new B($input), 'c' => new C($input), ); foreach($os as $n => $o) { echo str_repeat('=', 60), "\n"; echo "$n\n"; var_dump($o); var_dump($o->public); echo "\n"; echo str_repeat('=', 60), "\n"; }

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.0110.00718.55
8.3.50.0130.00522.18
8.3.40.0090.00918.67
8.3.30.0100.00519.21
8.3.20.0030.00520.35
8.3.10.0060.00321.76
8.3.00.0100.00019.01
8.2.180.0070.00716.38
8.2.170.0110.01122.96
8.2.160.0090.00622.02
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0040.00420.98
8.2.110.0060.00319.30
8.2.100.0090.00317.72
8.2.90.0060.00317.85
8.2.80.0030.00518.28
8.2.70.0000.00817.93
8.2.60.0050.00517.88
8.2.50.0090.00018.10
8.2.40.0030.00520.61
8.2.30.0080.00018.16
8.2.20.0040.00417.82
8.2.10.0000.00818.16
8.2.00.0070.00017.66
8.1.280.0070.01125.92
8.1.270.0060.00618.76
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.42
8.1.230.0080.00421.03
8.1.220.0030.00517.74
8.1.210.0030.00618.93
8.1.200.0050.00317.36
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0030.00618.59
8.1.160.0040.00422.09
8.1.150.0040.00418.98
8.1.140.0050.00217.45
8.1.130.0070.00017.87
8.1.120.0050.00217.47
8.1.110.0040.00417.48
8.1.100.0030.00517.52
8.1.90.0070.00017.40
8.1.80.0000.00817.40
8.1.70.0070.00017.49
8.1.60.0000.00817.55
8.1.50.0080.00017.57
8.1.40.0000.00917.43
8.1.30.0030.00617.63
8.1.20.0000.00717.68
8.1.10.0080.00017.57
8.1.00.0040.00417.53
8.0.300.0030.00519.98
8.0.290.0050.00216.75
8.0.280.0030.00318.48
8.0.270.0000.00817.36
8.0.260.0040.00417.34
8.0.250.0000.00716.97
8.0.240.0030.00316.92
8.0.230.0070.00016.86
8.0.220.0030.00516.91
8.0.210.0080.00016.98
8.0.200.0070.00316.89
8.0.190.0000.00716.87
8.0.180.0000.00717.02
8.0.170.0000.00816.97
8.0.160.0000.00716.84
8.0.150.0000.00717.00
8.0.140.0030.00516.77
8.0.130.0030.00313.36
8.0.120.0040.00416.87
8.0.110.0040.00416.89
8.0.100.0080.00016.89
8.0.90.0040.00416.78
8.0.80.0090.00916.83
8.0.70.0080.00016.98
8.0.60.0050.00316.98
8.0.50.0040.00416.84
8.0.30.0080.01217.21
8.0.20.0110.00917.42
8.0.10.0040.00416.98
8.0.00.0140.00516.79
7.4.330.0000.00515.07
7.4.320.0000.00716.66
7.4.300.0080.00016.55
7.4.290.0000.00716.63
7.4.280.0000.00816.53
7.4.270.0070.00016.55
7.4.260.0070.00016.64
7.4.250.0040.00416.50
7.4.240.0030.00516.59
7.4.230.0030.00316.57
7.4.220.0030.01416.64
7.4.210.0010.01416.52
7.4.200.0070.00016.70
7.4.160.0120.00616.47
7.4.150.0200.00817.40
7.4.140.0130.01317.86
7.4.130.0120.01016.46
7.4.120.0110.00916.60
7.4.110.0140.01016.54
7.4.100.0170.00616.49
7.4.90.0100.01016.55
7.4.80.0100.01016.48
7.4.70.0060.01216.48
7.4.60.0070.01116.59
7.4.50.0000.00616.63
7.4.40.0060.00916.28
7.4.30.0150.00916.24
7.4.00.0060.01014.98
7.3.330.0050.00013.33
7.3.320.0130.00413.32
7.3.310.0030.00316.30
7.3.300.0000.00716.20
7.3.290.0030.00316.37
7.3.280.0090.00816.30
7.3.270.0110.00717.40
7.3.260.0110.00716.50
7.3.250.0070.01516.33
7.3.240.0060.01316.29
7.3.230.0120.01216.49
7.3.210.0060.01316.73
7.3.200.0130.01019.39
7.3.190.0030.01416.54
7.3.180.0070.01116.72
7.3.170.0090.00916.41
7.3.160.0160.00316.36
7.3.10.0030.01416.79
7.3.00.0000.01416.67
7.2.330.0130.00616.82
7.2.320.0120.00616.80
7.2.310.0160.00416.74
7.2.300.0140.00616.63
7.2.290.0000.02416.79
7.2.130.0100.00316.89
7.2.120.0070.01016.95
7.2.110.0060.00916.94
7.2.100.0060.00917.11
7.2.90.0100.00717.05
7.2.80.0070.00417.03
7.2.70.0070.00716.85
7.2.60.0100.00617.03
7.2.50.0080.00416.79
7.2.40.0100.00317.00
7.2.30.0090.00616.99
7.2.20.0040.00717.02
7.2.10.0070.00716.71
7.2.00.0160.00618.00
7.1.250.0080.00415.56
7.1.200.0030.01015.89
7.1.100.0030.00718.14
7.1.70.0040.00417.24
7.1.60.0070.01819.46
7.1.50.0160.01016.59
7.1.00.0030.07722.36
7.0.200.0070.00315.10
7.0.140.0070.03022.05
7.0.60.0200.07321.80
7.0.50.0070.04317.88
7.0.40.0130.08020.13
7.0.30.0300.06720.26
7.0.20.0170.04720.13
7.0.10.0030.06320.15
7.0.00.0100.09020.08
5.6.280.0100.07020.95
5.6.210.0100.08320.62
5.6.200.0030.04318.20
5.6.190.0000.09020.64
5.6.180.0270.04720.77
5.6.170.0270.04020.55
5.6.160.0130.04320.50
5.6.150.0030.05018.24
5.6.140.0030.07718.14
5.6.130.0130.07318.19
5.6.120.0100.08021.08
5.6.110.0130.08321.17
5.6.100.0130.07721.03
5.6.90.0100.06021.04
5.6.80.0000.04320.34
5.5.350.0100.06020.35
5.5.340.0100.06318.00
5.5.330.0070.07720.21
5.5.320.0270.04720.19
5.5.310.0230.08020.41
5.5.300.0070.04718.00
5.5.290.0070.05717.98
5.5.280.0100.03720.82
5.5.270.0070.07720.82
5.5.260.0000.06320.90
5.5.250.0130.07320.67
5.5.240.0130.05020.39
5.4.450.3930.03319.61
5.4.440.2630.04319.39
5.4.430.4000.04019.28
5.4.420.4170.03019.54
5.4.410.3770.04019.32
5.4.400.3130.04019.21
5.4.390.0770.04318.99
5.4.380.2830.03018.96
5.4.370.2830.04019.23
5.4.360.3230.03719.20
5.4.350.2830.03719.24
5.4.340.2900.03319.22
5.4.320.2570.03719.06
5.4.310.3300.03318.93
5.4.300.1330.03719.10
5.4.290.3170.03319.11
5.4.280.4000.04319.21
5.4.270.3770.04018.93
5.4.260.3670.04018.95
5.4.250.3300.03319.05
5.4.240.3770.03719.21
5.4.230.3470.03318.93
5.4.220.3630.02719.14
5.4.210.3300.04319.27
5.4.200.2870.04319.06
5.4.190.4170.04018.96
5.4.180.3330.03319.05
5.4.170.3470.03319.21
5.4.160.3670.03319.18
5.4.150.4630.04319.22
5.4.140.3830.03316.50
5.4.130.3770.03716.45
5.4.120.3600.03716.53
5.4.110.3770.04016.56
5.4.100.4030.02316.31
5.4.90.3300.04016.36
5.4.80.3670.03716.60
5.4.70.4330.03716.29
5.4.60.3900.03016.53
5.4.50.3670.03316.46
5.4.40.3970.03316.52
5.4.30.3700.03316.49
5.4.20.4100.04016.55
5.4.10.3670.03316.50
5.4.00.3700.03316.04
5.3.290.2900.03314.75
5.3.280.3430.04314.79
5.3.270.3800.04014.65
5.3.260.3700.04014.59
5.3.250.4170.03714.71
5.3.240.4030.03714.69
5.3.230.3730.03314.70
5.3.220.4500.03714.66
5.3.210.3600.03714.65
5.3.200.3930.03314.62
5.3.190.4270.04314.63
5.3.180.3870.04014.51
5.3.170.4300.04014.62
5.3.160.4200.05014.63
5.3.150.3970.03314.63
5.3.140.3630.03314.50
5.3.130.3400.04014.59
5.3.120.3870.03714.61
5.3.110.4000.03714.49
5.3.100.3570.03714.13
5.3.90.3900.03714.23
5.3.80.3930.03714.12
5.3.70.3700.03314.07
5.3.60.3730.03314.05
5.3.50.4170.03713.97
5.3.40.3730.03313.95
5.3.30.3900.03013.86
5.3.20.3730.03313.67
5.3.10.3730.04013.61
5.3.00.1970.04013.70
5.2.170.3670.03311.26
5.2.160.3070.02711.17
5.2.150.3200.02711.14
5.2.140.3200.03011.25
5.2.130.3400.03011.13
5.2.120.3200.03011.12
5.2.110.2870.02711.15
5.2.100.2730.02311.23
5.2.90.3130.02311.15
5.2.80.1270.03011.19
5.2.70.2200.03311.15
5.2.60.2630.03011.05
5.2.50.3470.02711.22
5.2.40.2330.02711.08
5.2.30.2400.03310.98
5.2.20.2430.02711.01
5.2.10.2230.02710.83
5.2.00.2270.02710.69
5.1.60.2300.02310.04
5.1.50.2500.0209.95
5.1.40.2630.0209.99
5.1.30.2370.02310.41
5.1.20.2400.03010.54
5.1.10.2470.02710.18
5.1.00.2430.02710.11
5.0.50.1470.0208.61
5.0.40.1430.0238.43
5.0.30.1370.0338.26
5.0.20.0430.0208.23
5.0.10.0370.0208.20
5.0.00.0430.0238.21
4.4.90.1330.0176.64
4.4.80.1070.0136.64
4.4.70.1200.0176.68
4.4.60.1200.0176.68
4.4.50.1230.0136.70
4.4.40.1100.0236.71
4.4.30.1230.0176.75
4.4.20.1270.0176.75
4.4.10.1370.0176.78
4.4.00.1400.0276.79
4.3.110.1400.0206.80
4.3.100.1230.0176.81
4.3.90.0330.0136.82
4.3.80.0800.0276.84
4.3.70.0900.0136.84
4.3.60.0770.0136.86
4.3.50.1100.0136.86
4.3.40.1300.0236.86
4.3.30.0570.0176.86
4.3.20.0670.0136.87
4.3.10.0630.0176.87
4.3.00.0700.0136.89

preferences:
36.67 ms | 401 KiB | 5 Q