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); } } $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); var_dump($o->private); var_dump($o->protected); 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.01116.75
8.3.50.0100.00922.05
8.3.40.0100.01018.80
8.3.30.0180.00618.97
8.3.20.0040.00420.35
8.3.10.0040.00421.85
8.3.00.0070.00318.93
8.2.180.0140.00318.54
8.2.170.0120.00322.96
8.2.160.0060.01520.52
8.2.150.0040.00424.18
8.2.140.0060.00924.66
8.2.130.0040.00426.16
8.2.120.0000.00819.89
8.2.110.0070.00422.16
8.2.100.0070.00417.63
8.2.90.0080.00019.21
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0080.00018.01
8.2.20.0040.00417.74
8.2.10.0050.00318.16
8.2.00.0040.00417.86
8.1.280.0040.01125.92
8.1.270.0090.00018.95
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0000.00923.96
8.1.230.0070.00419.16
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0030.00517.13
8.1.180.0040.00418.10
8.1.170.0000.00820.56
8.1.160.0050.00221.97
8.1.150.0040.00418.94
8.1.140.0000.00817.35
8.1.130.0030.00317.82
8.1.120.0040.00417.50
8.1.110.0040.00417.46
8.1.100.0000.00717.43
8.1.90.0000.00717.47
8.1.80.0000.00817.47
8.1.70.0000.00717.40
8.1.60.0000.00817.54
8.1.50.0050.00317.57
8.1.40.0040.00417.43
8.1.30.0030.00617.47
8.1.20.0000.00817.71
8.1.10.0070.00017.45
8.1.00.0070.00317.48
8.0.300.0000.00918.77
8.0.290.0000.00816.88
8.0.280.0070.00018.57
8.0.270.0050.00317.25
8.0.260.0050.00317.25
8.0.250.0000.00716.93
8.0.240.0000.00717.06
8.0.230.0080.00016.98
8.0.220.0030.00316.85
8.0.210.0040.00416.97
8.0.200.0040.00416.89
8.0.190.0000.00716.94
8.0.180.0030.00516.93
8.0.170.0040.00417.02
8.0.160.0030.00516.96
8.0.150.0000.00716.99
8.0.140.0070.00016.94
8.0.130.0030.00313.34
8.0.120.0080.00016.94
8.0.110.0040.00416.87
8.0.100.0020.00516.84
8.0.90.0000.00816.88
8.0.80.0070.01016.90
8.0.70.0000.00716.91
8.0.60.0040.00416.86
8.0.50.0040.00416.96
8.0.30.0100.01017.01
8.0.20.0140.00717.40
8.0.10.0070.00017.10
8.0.00.0090.00916.67
7.4.330.0050.00015.03
7.4.320.0030.00316.59
7.4.300.0040.00416.51
7.4.290.0030.00316.64
7.4.280.0000.01016.50
7.4.270.0030.00316.53
7.4.260.0030.00316.55
7.4.250.0070.00316.58
7.4.240.0020.00616.54
7.4.230.0030.00316.40
7.4.220.0180.00016.56
7.4.210.0100.00816.56
7.4.200.0050.00216.47
7.4.160.0050.01116.45
7.4.150.0090.00917.40
7.4.140.0130.00917.86
7.4.130.0110.00816.54
7.4.120.0060.01116.47
7.4.110.0070.01116.55
7.4.100.0360.01916.38
7.4.90.0170.00616.66
7.4.80.0040.01316.38
7.4.70.0120.00616.51
7.4.60.0100.00616.55
7.4.50.0030.00316.37
7.4.40.0130.00316.41
7.4.30.0070.01716.66
7.4.00.0090.00614.67
7.3.330.0050.00013.24
7.3.320.0050.01113.20
7.3.310.0030.00316.23
7.3.300.0070.00016.21
7.3.290.0000.00716.25
7.3.280.0100.00716.40
7.3.270.0130.01317.40
7.3.260.0150.00616.46
7.3.250.0070.01216.48
7.3.240.0080.01316.69
7.3.230.0180.00016.48
7.3.210.0170.00016.44
7.3.200.0070.01819.39
7.3.190.0130.01016.69
7.3.180.0130.00316.73
7.3.170.0060.01216.41
7.3.160.0140.00516.43
7.2.330.0100.00716.46
7.2.320.0120.00616.77
7.2.310.0120.00916.61
7.2.300.0210.02216.47
7.2.290.0220.00216.54
7.2.60.0100.01016.84
7.2.00.0030.00619.28
7.1.200.0070.00715.88
7.1.100.0040.00818.04
7.1.70.0070.00317.27
7.1.60.0120.01219.46
7.1.50.0080.00416.86
7.1.00.0130.06722.46
7.0.200.0230.00314.89
7.0.140.0000.03722.00
7.0.60.0000.04319.88
7.0.50.0130.07717.97
7.0.40.0100.08720.31
7.0.30.0270.07020.08
7.0.20.0270.07720.22
7.0.10.0170.07720.12
7.0.00.0030.08320.24
5.6.280.0100.06721.09
5.6.210.0130.06720.74
5.6.200.0170.03318.20
5.6.190.0100.07020.50
5.6.180.0500.07720.47
5.6.170.0200.04020.54
5.6.160.0070.08720.55
5.6.150.0100.08018.29
5.6.140.0300.04318.25
5.6.130.0030.04318.19
5.6.120.0070.08721.03
5.6.110.0130.07020.92
5.6.100.0000.07320.98
5.6.90.0030.05721.04
5.6.80.0030.08020.57
5.5.350.0400.07020.36
5.5.340.0070.04017.92
5.5.330.0030.08320.31
5.5.320.0070.07720.30
5.5.310.0300.05720.36
5.5.300.0030.04017.99
5.5.290.0170.06717.97
5.5.280.0130.08020.68
5.5.270.0030.08720.76
5.5.260.0070.04720.79
5.5.250.0130.03320.78
5.5.240.0100.03720.22
5.4.450.0330.06019.67
5.4.440.0730.05019.46
5.4.430.1100.05319.61
5.4.420.0870.06319.47
5.4.410.1270.05019.23
5.4.400.1230.06018.99
5.4.390.0100.06318.78
5.4.380.0300.05018.75
5.4.370.0270.04318.82
5.4.360.0070.06318.50
5.4.350.0200.06718.60
5.4.340.0200.05718.59
5.4.320.0170.05318.80
5.4.310.0170.06018.75
5.4.300.0200.05018.50
5.4.290.0200.06018.84
5.4.280.0430.04718.80
5.4.270.0200.05018.51
5.4.260.0170.05718.78
5.4.250.0130.06018.58
5.4.240.0070.06718.58
5.4.230.0230.07018.71
5.4.220.0230.05018.77
5.4.210.0130.05718.79
5.4.200.0200.05016.63
5.4.190.0130.05718.58
5.4.180.0200.05018.82
5.4.170.0030.07018.82
5.4.160.0170.05018.75
5.4.150.0170.05318.70
5.4.140.0170.05016.47
5.4.130.0130.05016.39
5.4.120.0070.05716.32
5.4.110.0130.05016.31
5.4.100.0100.06016.46
5.4.90.0170.05716.46
5.4.80.0300.05316.28
5.4.70.0070.07716.30
5.4.60.0300.04016.27
5.4.50.0170.05016.31
5.4.40.0270.04316.32
5.4.30.0170.05016.32
5.4.20.0200.07016.28
5.4.10.0130.07316.16
5.4.00.0100.05315.77
5.3.290.0230.06714.81
5.3.280.0270.06714.63
5.3.270.0100.06714.82
5.3.260.0170.06014.82
5.3.250.0170.05314.62
5.3.240.0230.04714.69
5.3.230.0170.05314.63
5.3.220.0100.07014.74
5.3.210.0230.07314.73
5.3.200.0270.04314.63
5.3.190.0230.06714.60
5.3.180.0230.04714.59
5.3.170.0130.05314.60
5.3.160.0170.05714.82
5.3.150.0130.05714.76
5.3.140.0230.05714.75
5.3.130.0200.06314.79
5.3.120.0200.05314.76
5.3.110.0130.06014.59
5.3.100.0200.05714.10
5.3.90.0100.06714.10
5.3.80.0100.05714.09
5.3.70.0300.03714.18
5.3.60.0170.05314.14
5.3.50.0130.05314.15
5.3.40.0230.04314.11
5.3.30.0170.05314.16
5.3.20.0170.04713.77
5.3.10.0170.05313.79
5.3.00.0170.05313.72
5.2.170.0170.04711.16
5.2.160.0130.04711.19
5.2.150.0170.05311.40
5.2.140.0130.04711.20
5.2.130.0130.04711.23
5.2.120.0230.04011.16
5.2.110.0170.04011.18
5.2.100.0270.03011.17
5.2.90.0100.04711.18
5.2.80.0200.04011.13
5.2.70.0200.04711.13
5.2.60.0270.05311.29
5.2.50.0270.05011.12
5.2.40.0130.06011.08
5.2.30.0170.03711.21
5.2.20.0270.02711.16
5.2.10.0170.03710.89
5.2.00.0230.05010.75
5.1.60.0170.03310.05
5.1.50.0170.03310.06
5.1.40.0170.03310.13
5.1.30.0200.03710.41
5.1.20.0100.04010.48
5.1.10.0130.03310.08
5.1.00.0070.04010.30
5.0.50.0030.0408.76
5.0.40.0130.0338.64
5.0.30.0070.0478.45
5.0.20.0070.0278.23
5.0.10.0070.0338.28
5.0.00.0070.0508.38
4.4.90.0030.0236.84
4.4.80.0130.0176.84
4.4.70.0170.0136.84
4.4.60.0030.0276.84
4.4.50.0070.0206.84
4.4.40.0070.0436.84
4.4.30.0030.0236.84
4.4.20.0070.0206.84
4.4.10.0070.0206.84
4.4.00.0070.0336.84
4.3.110.0030.0276.84
4.3.100.0100.0176.84
4.3.90.0070.0206.84
4.3.80.0070.0336.84
4.3.70.0030.0236.84
4.3.60.0070.0206.84
4.3.50.0030.0236.84
4.3.40.0070.0376.84
4.3.30.0070.0206.84
4.3.20.0030.0236.84
4.3.10.0030.0236.84
4.3.00.0270.02714.42

preferences:
52.64 ms | 401 KiB | 5 Q