3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $foo = 'initial'; public function get():string {return $this->foo; } public function set(string $bar): A {$this->foo = $bar; return $this;} } class B extends A { public function set(string $bar): B {$this->foo = $bar.'!'; return $this;} } $a = new A; $b = new B; $a->set('A'); $b->set('B'); var_dump([$a->get(), $b->get()]);

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.53
8.3.50.0070.00718.19
8.3.40.0120.00318.73
8.3.30.0110.00418.67
8.3.20.0040.00420.14
8.3.10.0030.00622.10
8.3.00.0030.00621.53
8.2.180.0140.00718.29
8.2.170.0040.01122.96
8.2.160.0040.01122.26
8.2.150.0090.00025.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00319.64
8.2.110.0070.00322.14
8.2.100.0060.00617.75
8.2.90.0060.00317.85
8.2.80.0040.00419.16
8.2.70.0040.00417.93
8.2.60.0000.00817.63
8.2.50.0050.00318.07
8.2.40.0040.00717.93
8.2.30.0000.00718.17
8.2.20.0000.00817.94
8.2.10.0000.00817.95
8.2.00.0070.00018.05
8.1.280.0140.00325.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00321.05
8.1.230.0090.00320.95
8.1.220.0000.00717.74
8.1.210.0050.00518.77
8.1.200.0030.00617.36
8.1.190.0040.00417.23
8.1.180.0030.00618.10
8.1.170.0050.00318.59
8.1.160.0040.00418.87
8.1.150.0050.00220.10
8.1.140.0080.00017.72
8.1.130.0040.00419.06
8.1.120.0040.00417.55
8.1.110.0000.00817.50
8.1.100.0000.00817.47
8.1.90.0040.00417.43
8.1.80.0050.00217.45
8.1.70.0070.00317.44
8.1.60.0040.00417.61
8.1.50.0050.00217.57
8.1.40.0000.00817.42
8.1.30.0050.00317.62
8.1.20.0020.00517.69
8.1.10.0030.00517.62
8.1.00.0060.00317.41
8.0.300.0080.00020.13
8.0.290.0060.00316.63
8.0.280.0030.00718.50
8.0.270.0030.00417.27
8.0.260.0040.00418.47
8.0.250.0060.00316.86
8.0.240.0000.00816.98
8.0.230.0040.00416.93
8.0.220.0030.00316.84
8.0.210.0070.00016.91
8.0.200.0070.00016.98
8.0.190.0030.00516.98
8.0.180.0000.00716.91
8.0.170.0000.00716.93
8.0.160.0050.00216.94
8.0.150.0040.00416.89
8.0.140.0030.00616.77
8.0.130.0000.00513.37
8.0.120.0070.00016.86
8.0.110.0040.00416.91
8.0.100.0040.00416.86
8.0.90.0050.00216.79
8.0.80.0060.01316.84
8.0.70.0040.00416.86
8.0.60.0040.00416.86
8.0.50.0040.00416.91
8.0.30.0070.01217.12
8.0.20.0120.00917.40
8.0.10.0000.00717.06
8.0.00.0110.00716.82
7.4.330.0030.00315.55
7.4.320.0000.00616.54
7.4.300.0040.00416.44
7.4.290.0000.00716.39
7.4.280.0040.00416.65
7.4.270.0030.00316.57
7.4.260.0030.00316.63
7.4.250.0070.00016.56
7.4.240.0070.00016.43
7.4.230.0040.00416.63
7.4.220.0090.00916.53
7.4.210.0110.00616.63
7.4.200.0000.00716.57
7.4.160.0130.00416.57
7.4.150.0240.00017.40
7.4.140.0120.00817.86
7.4.130.0140.00516.53
7.4.120.0110.00816.49
7.3.330.0030.00313.25
7.3.320.0000.00713.11
7.3.310.0070.00016.28
7.3.300.0000.00716.23
7.3.290.0000.00716.14
7.3.280.0110.00816.23
7.3.270.0090.01217.40
7.3.260.0110.00716.23
7.3.250.0080.01016.30
7.3.240.0090.00816.25
7.1.100.0160.00816.02

preferences:
80.72 ms | 401 KiB | 5 Q