3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { private int $pv = 0; protected int $pt = 0; public int $pb = 0; public function setBase(int $i) { $this->pv = $i; $this->pt = $i; $this->pb = $i; } public function dump() { echo "private(base):$this->pv; protected(base):$this->pt; public(base):$this->pb\n"; } }; class Derived extends Base { private int $pv = 0; protected int $pt = 0; public int $pb = 0; public function setDerived(int $i) { $this->pv = $i; $this->pt = $i; $this->pb = $i; } public function dump() { parent::dump(); echo "private(derived):$this->pv; protected(derived):$this->pt; public(derived):$this->pb\n"; } }; $o = new Derived; $o->setBase(2); $o->dump(); $o->setDerived(6); $o->dump();

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.140.0100.01017.47
8.4.130.0120.00917.85
8.4.120.0090.01222.44
8.4.110.0140.00622.32
8.4.100.0100.01017.96
8.4.90.0040.00618.84
8.4.80.0130.00717.99
8.4.70.0100.00317.74
8.4.60.0130.00720.56
8.4.50.0110.01019.41
8.4.40.0110.00717.95
8.4.30.0040.00423.94
8.4.20.0160.00319.50
8.4.10.0040.00419.41
8.3.260.0090.00716.53
8.3.250.0080.00918.81
8.3.240.0110.00816.71
8.3.230.0120.00916.46
8.3.220.0120.00517.05
8.3.210.0030.00716.85
8.3.200.0040.00416.62
8.3.190.0100.00916.98
8.3.180.0100.00916.71
8.3.170.0170.00316.90
8.3.160.0110.00720.77
8.3.150.0110.00717.40
8.3.140.0070.01122.50
8.3.130.0040.00416.56
8.3.120.0160.01016.16
8.3.110.0120.01216.34
8.3.100.0200.00416.52
8.3.90.0250.00416.31
8.3.80.0270.00016.26
8.3.70.0270.00316.46
8.3.60.0270.00316.31
8.3.50.0200.00716.68
8.3.40.0190.00417.43
8.3.30.0180.00417.39
8.3.20.0160.00817.59
8.3.10.0150.01117.22
8.3.00.0170.00517.39
8.2.290.0080.00920.25
8.2.280.0050.00318.30
8.2.270.0090.00616.79
8.2.260.0100.00717.29
8.2.250.0040.00416.59
8.2.240.0190.00516.54
8.2.230.0190.00616.50
8.2.220.0160.01016.23
8.2.210.0220.00016.43
8.2.200.0140.00716.63
8.2.190.0200.00316.66
8.2.180.0140.01016.48
8.2.170.0100.01317.41
8.2.160.0170.00817.23
8.2.150.0180.00617.37
8.2.140.0230.00017.25
8.2.130.0180.00417.14
8.2.120.0170.00517.18
8.2.110.0210.00017.50
8.2.100.0210.00017.38
8.2.90.0220.00017.16
8.2.80.0230.00017.20
8.2.70.0180.00417.16
8.2.60.0190.00317.29
8.2.50.0130.01017.20
8.2.40.0130.01017.37
8.2.30.0160.00817.00
8.2.20.0170.00417.32
8.2.10.0180.00317.28
8.2.00.0210.00017.25
8.1.330.0100.00921.95
8.1.320.0110.01016.31
8.1.310.0070.01118.30
8.1.300.0210.00016.07
8.1.290.0170.00416.07
8.1.280.0170.00316.13
8.1.270.0160.00417.30
8.1.260.0200.00017.19
8.1.250.0180.00317.42
8.1.240.0160.00317.05
8.1.230.0090.00917.16
8.1.220.0150.00217.30
8.1.210.0110.00817.07
8.1.200.0140.00917.03
8.1.190.0140.00517.07
8.1.180.0150.00517.07
8.1.170.0330.00617.06
8.1.160.0290.00917.13
8.1.150.0310.00417.13
8.1.140.0210.01816.98
8.1.130.0310.00817.06
8.1.120.0320.00816.93
8.1.110.0350.00817.13
8.1.100.0320.00316.96
8.1.90.0340.00017.02
8.1.80.0140.00516.91
8.1.70.0040.01517.27
8.1.60.0160.00417.24
8.1.50.0130.00617.30
8.1.40.0170.00217.50
8.1.30.0100.01517.31
8.1.20.0140.00617.37
8.1.10.0130.00717.43
8.1.00.0200.00017.14

preferences:
56.07 ms | 403 KiB | 5 Q