3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected string $city = "CityB"; private string $name = "NameA"; public function getDataA() { return [ $this->city, $this->name ]; } } class B extends A { public string $city = "CityB"; public string $name = "NameB"; public function getDataB() { return [ $this->city, $this->name ]; } } $c = new B; var_dump($c, $c->getDataA(), $c->getDataB());

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.4.120.0080.01123.98
8.4.110.0130.00720.46
8.4.100.0050.00418.77
8.4.90.0080.00122.14
8.4.80.0120.00718.88
8.4.70.0110.01117.79
8.4.60.0070.00918.98
8.4.50.0160.00618.72
8.4.40.0060.01317.60
8.4.30.0100.01018.95
8.4.20.0060.00321.09
8.4.10.0060.00319.65
8.3.250.0090.00117.20
8.3.240.0110.00717.17
8.3.230.0130.00716.56
8.3.220.0040.00318.82
8.3.210.0130.00516.52
8.3.200.0040.00516.50
8.3.190.0130.00416.98
8.3.180.0040.00717.07
8.3.170.0130.00619.12
8.3.160.0060.01216.55
8.3.150.0150.00316.50
8.3.140.0090.00616.71
8.3.130.0060.01016.45
8.3.120.0090.00618.88
8.3.110.0060.00320.94
8.3.100.0090.00018.16
8.3.90.0050.00318.56
8.3.80.0030.00618.43
8.3.70.0440.00817.97
8.3.60.0430.00717.97
8.3.50.0120.00718.37
8.3.40.0340.00217.97
8.3.30.0280.00717.97
8.3.20.0290.00817.97
8.3.10.0240.00817.97
8.3.00.0260.00617.97
8.2.290.0050.00320.34
8.2.280.0120.00718.48
8.2.270.0130.00616.45
8.2.260.0090.00016.93
8.2.250.0120.00616.51
8.2.240.0070.00318.86
8.2.230.0090.00022.58
8.2.220.0090.00024.06
8.2.210.0130.00026.77
8.2.200.0030.00618.88
8.2.190.0270.00617.97
8.2.180.0170.01117.97
8.2.170.0210.00617.97
8.2.160.0170.00617.97
8.2.150.0200.00417.97
8.2.140.0200.00717.97
8.2.130.0200.00717.97
8.2.120.0160.01117.97
8.2.110.0220.00717.97
8.2.100.0260.00717.97
8.2.90.0310.00417.97
8.2.80.0210.01617.97
8.2.70.0250.01017.97
8.2.60.0280.00317.97
8.2.50.0270.00617.97
8.2.40.0240.00817.97
8.2.30.0240.00917.97
8.2.20.0360.00917.97
8.2.10.0320.01117.97
8.2.00.0360.00517.97
8.1.330.0100.00621.94
8.1.320.0110.00818.07
8.1.310.0110.00716.85
8.1.300.0040.00716.04
8.1.290.0030.00930.84
8.1.280.0330.00817.97
8.1.270.0300.01217.97
8.1.260.0290.00917.97
8.1.250.0270.00517.97
8.1.240.0250.00517.97
8.1.230.0240.00717.97
8.1.220.0230.00717.97
8.1.210.0200.00617.97
8.1.200.0230.01217.97
8.1.190.0260.01117.97
8.1.180.0280.01117.97
8.1.170.0320.00817.97
8.1.160.0340.00617.97
8.1.150.0340.01117.97
8.1.140.0410.00517.97
8.1.130.0260.00717.97
8.1.120.0210.00917.97
8.1.110.0180.01017.97
8.1.100.0220.00317.97
8.1.90.0180.00417.97
8.1.80.0220.00517.97
8.1.70.0210.00617.97
8.1.60.0240.00517.97
8.1.50.0230.00817.97
8.1.40.0220.00917.97
8.1.30.0280.00517.97
8.1.20.0220.00917.97
8.1.10.0200.01117.97
8.1.00.0370.00717.97

preferences:
27.15 ms | 403 KiB | 5 Q