3v4l.org

run code in 300+ PHP versions simultaneously
<?php class b{ public $o; public function __construct(){ $this->o = (object)array('id'=>12); } } class foo { private $b; public function __construct(){ $this->b = new b(); } public function bar(){ return $this->b; } } $f = new foo(); var_dump( $f->bar()->o->id );

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.0070.00718.65
8.3.50.0110.01117.90
8.3.40.0060.00918.63
8.3.30.0150.00018.71
8.3.20.0080.00020.88
8.3.10.0040.00423.70
8.3.00.0000.00820.89
8.2.180.0070.00718.67
8.2.170.0110.00422.96
8.2.160.0070.00721.97
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0180.00018.03
8.2.120.0070.00026.35
8.2.110.0040.00421.00
8.2.100.0070.00419.51
8.2.90.0060.00318.03
8.2.80.0080.00317.97
8.2.70.0090.00017.91
8.2.60.0000.00819.75
8.2.50.0000.00818.10
8.2.40.0100.00019.10
8.2.30.0000.00719.30
8.2.20.0000.00718.09
8.2.10.0050.00319.24
8.2.00.0000.00818.12
8.1.280.0070.01025.92
8.1.270.0050.00322.15
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0040.00822.75
8.1.220.0090.00017.74
8.1.210.0060.00318.77
8.1.200.0000.00917.36
8.1.190.0030.00617.22
8.1.180.0030.00718.10
8.1.170.0000.00818.52
8.1.160.0080.00018.89
8.1.150.0040.00418.86
8.1.140.0000.00718.93
8.1.130.0070.00020.28
8.1.120.0000.00717.46
8.1.110.0000.00817.34
8.1.100.0050.00317.46
8.1.90.0070.00017.41
8.1.80.0080.00017.37
8.1.70.0000.00717.42
8.1.60.0060.00317.58
8.1.50.0060.00317.49
8.1.40.0040.00417.41
8.1.30.0080.00317.64
8.1.20.0080.00017.66
8.1.10.0040.00417.49
8.1.00.0050.00317.42
8.0.300.0080.00019.64
8.0.290.0040.00416.75
8.0.280.0030.00518.38
8.0.270.0070.00017.20
8.0.260.0030.00318.38
8.0.250.0000.00716.95
8.0.240.0000.00716.92
8.0.230.0080.00016.82
8.0.220.0000.00716.79
8.0.210.0040.00416.90
8.0.200.0000.00716.96
8.0.190.0050.00316.95
8.0.180.0070.00016.93
8.0.170.0000.00816.90
8.0.160.0040.00416.87
8.0.150.0000.00716.84
8.0.140.0040.00416.72
8.0.130.0030.00313.35
8.0.120.0030.00516.85
8.0.110.0000.00816.96
8.0.100.0050.00216.88
8.0.90.0040.00416.95
8.0.80.0100.00816.82
8.0.70.0040.00416.95
8.0.60.0050.00316.91
8.0.50.0050.00217.00
8.0.30.0120.00616.78
8.0.20.0130.00816.90
8.0.10.0040.00416.91
8.0.00.0080.01016.81
7.4.330.0000.00516.67
7.4.320.0000.00616.61
7.4.300.0030.00316.43
7.4.290.0000.00716.60
7.4.280.0030.00516.50
7.4.270.0000.00716.43
7.4.260.0050.00316.56
7.4.250.0070.00016.47
7.4.240.0030.00316.39
7.4.230.0000.00716.40
7.4.220.0040.00416.50
7.4.210.0040.01116.61
7.4.200.0000.00716.58
7.4.160.0090.00916.50
7.4.140.0030.01617.86
7.4.130.0150.00316.42
7.4.120.0100.00716.69
7.4.110.0100.00716.44
7.4.100.0060.01216.54
7.4.90.0090.00916.31
7.4.80.0100.01019.39
7.4.70.0070.01016.46
7.4.60.0080.00916.43
7.4.50.0150.00316.41
7.4.40.0070.01016.60
7.4.00.0070.00814.95
7.3.330.0030.00313.19
7.3.320.0000.00713.22
7.3.310.0030.00316.38
7.3.300.0040.00416.27
7.3.290.0080.00816.34
7.3.280.0080.00816.34
7.3.260.0110.00716.36
7.3.240.0090.00716.34
7.3.230.0060.01016.52
7.3.210.0100.01316.26
7.3.200.0070.01416.44
7.3.190.0070.01016.65
7.3.180.0130.00316.39
7.3.170.0080.00816.55
7.3.160.0060.00916.39
7.3.30.0060.00314.83
7.3.20.0130.00316.59
7.3.10.0110.00316.18
7.3.00.0030.00616.54
7.2.330.0100.00716.57
7.2.320.0080.01516.53
7.2.310.0060.01016.40
7.2.300.0120.00916.52
7.2.290.0130.01016.50
7.2.160.0090.00315.04
7.2.150.0000.01016.76
7.2.140.0090.01216.67
7.2.130.0140.00716.98
7.2.120.0140.00716.75
7.2.110.0100.01317.15
7.2.100.0080.00816.98
7.2.90.0050.00516.75
7.2.80.0070.00317.14
7.2.70.0050.00617.15
7.2.60.0040.01216.77
7.2.50.0100.01316.97
7.2.40.0190.00816.79
7.2.30.0070.00316.78
7.2.20.0100.00316.85
7.2.10.0070.00816.50
7.2.00.0030.00916.92
7.1.270.0070.00315.55
7.1.260.0060.00315.55
7.1.250.0140.00615.36

preferences:
79.09 ms | 401 KiB | 5 Q