3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * call property by deferencing array * */ class myStr { public $s = "yet another string"; function getStr(){ return $this->s; } } class Nothing {} $arr = array(); $obj1 = new myStr; $obj2 = new Nothing; echo [$obj1,$obj2][0]->s;

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.01016.50
8.3.50.0100.00716.47
8.3.40.0180.00018.91
8.3.30.0120.00318.71
8.3.20.0070.00020.04
8.3.10.0000.00821.73
8.3.00.0070.00021.76
8.2.180.0140.00016.63
8.2.170.0060.00922.96
8.2.160.0100.00320.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.18
8.2.120.0000.00726.35
8.2.110.0070.00320.94
8.2.100.0060.00618.04
8.2.90.0000.00819.36
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0080.00017.93
8.2.50.0000.01018.09
8.2.40.0060.00322.20
8.2.30.0050.00219.41
8.2.20.0040.00419.44
8.2.10.0070.00018.17
8.2.00.0040.00418.21
8.1.280.0090.00625.92
8.1.270.0030.00622.19
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0050.00522.66
8.1.230.0110.00019.10
8.1.220.0000.00917.78
8.1.210.0040.00418.77
8.1.200.0100.00017.13
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00418.60
8.1.160.0050.00320.79
8.1.150.0000.00820.58
8.1.140.0090.00019.58
8.1.130.0000.00717.68
8.1.120.0070.00017.50
8.1.110.0000.00717.38
8.1.100.0000.00817.33
8.1.90.0040.00417.50
8.1.80.0040.00417.46
8.1.70.0000.00817.49
8.1.60.0050.00217.48
8.1.50.0000.00817.52
8.1.40.0030.00717.54
8.1.30.0000.00817.58
8.1.20.0080.00017.67
8.1.10.0000.00717.61
8.1.00.0000.00717.34
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.50
8.0.270.0050.00217.33
8.0.260.0030.00317.24
8.0.250.0030.00316.93
8.0.240.0030.00516.84
8.0.230.0000.00716.85
8.0.220.0030.00316.92
8.0.210.0030.00316.88
8.0.200.0070.00016.85
8.0.190.0030.00316.85
8.0.180.0040.00416.91
8.0.170.0040.00416.81
8.0.160.0080.00016.86
8.0.150.0040.00416.73
8.0.140.0040.00416.87
8.0.130.0050.00213.27
8.0.120.0000.00716.89
8.0.110.0000.00716.89
8.0.100.0000.00816.82
8.0.90.0000.00916.83
8.0.80.0120.00316.76
8.0.70.0000.00716.89
8.0.60.0000.00816.74
8.0.50.0000.00716.84
8.0.30.0080.01117.00
8.0.20.0090.01317.40
8.0.10.0040.00417.07
8.0.00.0110.00617.02
7.4.330.0000.00616.78
7.4.320.0000.00616.43
7.4.300.0050.00316.61
7.4.290.0030.00316.59
7.4.280.0040.00416.55
7.4.270.0030.00316.60
7.4.260.0000.00716.46
7.4.250.0040.00416.56
7.4.240.0000.00716.53
7.4.230.0070.00016.63
7.4.220.0100.01716.61
7.4.210.0110.00916.58
7.4.200.0030.00316.67
7.4.160.0140.00716.29
7.4.150.0070.01117.40
7.4.140.0140.00617.86
7.4.130.0120.00516.35
7.4.120.0100.00716.49
7.4.110.0070.01016.49
7.4.100.0150.00416.64
7.4.90.0140.00416.47
7.4.80.0110.00619.39
7.4.70.0070.01016.50
7.4.60.0030.01216.42
7.4.50.0060.00616.56
7.4.40.0100.00716.40
7.4.30.0090.01516.57
7.4.00.0040.01314.97
7.3.330.0000.00513.29
7.3.320.0050.00013.16
7.3.310.0000.00716.29
7.3.300.0030.00316.29
7.3.290.0070.00016.23
7.3.280.0070.00916.31
7.3.270.0100.00717.40
7.3.260.0080.00816.42
7.3.250.0090.01016.32
7.3.240.0110.00816.42
7.3.230.0040.01416.48
7.3.210.0070.01016.54
7.3.200.0090.00919.39
7.3.190.0100.00716.43
7.3.180.0100.01016.36
7.3.170.0100.00716.67
7.3.160.0060.01216.40
7.3.120.0030.01014.86
7.3.110.0100.00314.91
7.3.100.0090.00414.93
7.3.90.0080.00014.74
7.3.80.0030.00714.75
7.3.70.0080.00814.88
7.3.60.0090.00614.78
7.3.50.0030.01014.73
7.3.40.0100.00314.79
7.3.30.0030.01014.68
7.3.20.0060.00916.82
7.3.10.0070.00716.49
7.3.00.0140.00516.41
7.2.330.0090.00916.64
7.2.320.0060.00916.51
7.2.310.0110.00716.35
7.2.300.0160.00016.33
7.2.290.0130.00316.35
7.2.250.0060.00915.36
7.2.240.0030.01214.97
7.2.230.0040.01114.75
7.2.220.0000.01014.96
7.2.210.0100.00314.87
7.2.200.0080.00514.80
7.2.190.0030.01415.11
7.2.180.0130.00314.75
7.2.170.0000.01415.11
7.2.130.0070.01116.75
7.2.120.0120.00716.98
7.2.110.0090.00716.79
7.2.100.0030.00916.63
7.2.90.0070.01017.01
7.2.80.0090.00716.75
7.2.70.0070.01116.45
7.2.60.0110.01016.88
7.2.50.0160.00516.84
7.2.40.0080.01516.66
7.2.30.0100.00916.77
7.2.20.0100.00716.80
7.2.10.0080.01116.48
7.2.00.0060.01017.65
7.1.330.0070.00715.73
7.1.320.0070.01115.40
7.1.310.0060.00615.80
7.1.300.0120.00615.39
7.1.290.0090.00915.37
7.1.280.0070.00715.71
7.1.270.0050.00515.39
7.1.260.0040.01515.91
7.1.250.0090.00415.51
7.1.200.0040.00715.91
7.1.100.0120.00818.15
7.1.70.0000.00817.04
7.1.60.0070.01419.40
7.1.50.0060.00616.93
7.1.00.0000.08022.54
7.0.200.0070.00316.66
7.0.60.0230.07721.88
7.0.50.0070.04717.86
7.0.40.0100.08020.25
7.0.30.0170.07720.10
7.0.20.0200.08020.07
7.0.10.0070.09020.27
7.0.00.0130.08320.10
5.6.280.0070.06021.05
5.6.210.0130.04320.50
5.6.200.0130.05718.19
5.6.190.0100.06720.45
5.6.180.0030.07720.77
5.6.170.0170.04720.48
5.6.160.0030.06020.71
5.6.150.0070.06718.14
5.6.140.0070.08718.14
5.6.130.0030.05318.19
5.6.120.0100.08021.13
5.6.110.0100.08020.99
5.6.100.0130.06321.04
5.6.90.0030.07021.00
5.6.80.0030.06320.54
5.5.350.0130.03320.34
5.5.340.0100.06718.08
5.5.330.0200.07320.35
5.5.320.0200.05020.24
5.5.310.0130.05320.36
5.5.300.0030.06317.94
5.5.290.0070.06717.94
5.5.280.0100.03320.80
5.5.270.0130.07320.88
5.5.260.0070.06320.87
5.5.250.0030.08320.66
5.5.240.0230.06720.01

preferences:
47 ms | 400 KiB | 5 Q