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(); if (isset($f->bar()->id)){ echo $f->bar()->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.0080.00818.56
8.3.50.0110.00417.99
8.3.40.0060.00918.68
8.3.30.0110.00418.49
8.3.20.0000.00820.89
8.3.10.0040.00421.68
8.3.00.0110.00720.69
8.2.180.0110.00718.13
8.2.170.0070.00722.96
8.2.160.0100.00322.12
8.2.150.0080.00024.18
8.2.140.0040.01124.66
8.2.130.0080.00026.16
8.2.120.0030.00721.05
8.2.110.0060.00321.05
8.2.100.0040.00817.78
8.2.90.0000.00818.22
8.2.80.0040.00417.97
8.2.70.0040.00417.80
8.2.60.0080.00018.09
8.2.50.0000.00818.10
8.2.40.0040.00819.35
8.2.30.0070.00019.09
8.2.20.0030.00517.97
8.2.10.0050.00319.07
8.2.00.0070.00018.17
8.1.280.0070.01125.92
8.1.270.0000.00920.34
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00021.88
8.1.230.0070.00321.04
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0060.00317.36
8.1.190.0050.00317.00
8.1.180.0080.00018.10
8.1.170.0030.00518.47
8.1.160.0040.00418.77
8.1.150.0050.00218.73
8.1.140.0000.00719.01
8.1.130.0040.00417.32
8.1.120.0040.00417.41
8.1.110.0000.00817.40
8.1.100.0000.00817.45
8.1.90.0040.00417.39
8.1.80.0000.00817.39
8.1.70.0000.00717.35
8.1.60.0050.00317.54
8.1.50.0030.00617.54
8.1.40.0000.00817.50
8.1.30.0040.00417.66
8.1.20.0050.00517.57
8.1.10.0000.00717.47
8.1.00.0060.00317.43
8.0.300.0000.00719.90
8.0.290.0040.00416.75
8.0.280.0030.00318.37
8.0.270.0000.00717.19
8.0.260.0050.00316.73
8.0.250.0080.00016.94
8.0.240.0000.00816.93
8.0.230.0070.00016.82
8.0.220.0040.00416.93
8.0.210.0020.00516.79
8.0.200.0000.00716.98
8.0.190.0040.00416.95
8.0.180.0040.00416.86
8.0.170.0030.00516.96
8.0.160.0020.00516.78
8.0.150.0000.00816.82
8.0.140.0080.00016.79
8.0.130.0030.00313.34
8.0.120.0040.00416.84
8.0.110.0040.00416.91
8.0.100.0030.00516.93
8.0.90.0040.00416.95
8.0.80.0100.00916.85
8.0.70.0070.00016.75
8.0.60.0020.00516.79
8.0.50.0030.00516.68
8.0.30.0120.00716.99
8.0.20.0060.01517.12
8.0.10.0000.00716.95
8.0.00.0100.00816.79
7.4.330.0060.00016.67
7.4.320.0030.00316.49
7.4.300.0030.00316.38
7.4.290.0000.00816.41
7.4.280.0050.00316.49
7.4.270.0000.00716.64
7.4.260.0040.00416.44
7.4.250.0030.00316.61
7.4.240.0040.00416.63
7.4.230.0030.00316.30
7.4.220.0000.00816.62
7.4.210.0070.00716.59
7.4.200.0000.00816.70
7.4.160.0090.00616.47
7.4.140.0110.00617.86
7.4.130.0030.01416.41
7.4.120.0150.00616.37
7.4.110.0100.00716.50
7.4.100.0090.00916.54
7.4.90.0120.00316.41
7.4.80.0140.00419.39
7.4.70.0100.00916.51
7.4.60.0060.01016.43
7.4.50.0110.00716.23
7.4.40.0120.00416.55
7.4.00.0030.01214.65
7.3.330.0000.00513.18
7.3.320.0050.00013.35
7.3.310.0000.00816.38
7.3.300.0070.00016.31
7.3.290.0080.00916.32
7.3.280.0100.00916.29
7.3.260.0100.00816.44
7.3.240.0080.01016.30
7.3.230.0110.00716.36
7.3.210.0180.00416.28
7.3.200.0130.00616.18
7.3.190.0170.00016.59
7.3.180.0140.00316.45
7.3.170.0000.02216.48
7.3.160.0100.00616.39
7.3.30.0090.00314.47
7.3.20.0060.00616.49
7.3.10.0070.00716.31
7.3.00.0160.00616.45
7.2.330.0150.00316.83
7.2.320.0120.00916.46
7.2.310.0140.00316.80
7.2.300.0060.01316.53
7.2.290.0070.01116.57
7.2.160.0090.00414.64
7.2.150.0070.00716.57
7.2.140.0180.00416.52
7.2.130.0030.01216.94
7.2.120.0100.01616.59
7.2.110.0030.00916.65
7.2.100.0150.00716.58
7.2.90.0110.01117.07
7.2.80.0110.00316.99
7.2.70.0070.00716.45
7.2.60.0100.01017.08
7.2.50.0030.01016.63
7.2.40.0090.00616.71
7.2.30.0070.00716.56
7.2.20.0140.00716.41
7.2.10.0090.01216.88
7.2.00.0110.01116.91
7.1.270.0090.00615.65
7.1.260.0030.00615.63
7.1.250.0040.00815.50

preferences:
60.8 ms | 400 KiB | 5 Q