3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $data; protected $foo = ''; public function a() { (new B())->foo($this); var_dump($this); if (isset($this->data['test'])) { $this->foo = $this->data['test']; } } } class B { public function foo(&$var) { $var = 1; } } $a = new A(); $a->a();

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.5.00.0130.00820.04
8.4.150.0030.00014.05
8.4.140.0120.01017.88
8.4.130.0120.00519.21
8.4.120.0070.01420.79
8.4.110.0100.00922.43
8.4.100.0130.00920.79
8.4.90.0100.00618.82
8.4.80.0100.00920.70
8.4.70.0110.00817.71
8.4.60.0120.00919.07
8.4.50.0130.00718.51
8.4.40.0030.00517.71
8.4.30.0100.01020.67
8.4.20.0130.00717.91
8.4.10.0040.00419.20
8.3.280.0090.01118.32
8.3.270.0120.00716.42
8.3.260.0130.00516.55
8.3.250.0030.00618.76
8.3.240.0150.00418.80
8.3.230.0130.00616.28
8.3.220.0140.00418.70
8.3.210.0110.00516.29
8.3.200.0050.00416.45
8.3.190.0080.01017.24
8.3.180.0090.01016.47
8.3.170.0150.00418.86
8.3.160.0110.00717.08
8.3.150.0040.01518.90
8.3.140.0000.00717.14
8.3.130.0030.00518.61
8.3.120.0000.00918.96
8.3.110.0030.00820.94
8.3.100.0060.00316.49
8.3.90.0090.00926.77
8.3.80.0080.00417.97
8.3.70.0140.00418.20
8.3.60.0110.00718.23
8.3.50.0120.00316.41
8.3.40.0120.00321.94
8.3.30.0110.00420.17
8.3.20.0090.01325.66
8.3.10.0070.01325.66
8.3.00.0100.01025.66
8.2.290.0070.00320.39
8.2.280.0120.00818.29
8.2.270.0040.01417.27
8.2.260.0000.00818.60
8.2.250.0080.00018.30
8.2.240.0040.00417.07
8.2.230.0060.00322.58
8.2.220.0060.00324.06
8.2.210.0070.01026.77
8.2.200.0060.00316.63
8.2.190.0150.00018.30
8.2.180.0100.01016.38
8.2.170.0110.00418.79
8.2.160.0120.00622.96
8.2.150.0150.00725.66
8.2.140.0100.01025.66
8.2.130.0100.01025.66
8.2.120.0100.01025.66
8.2.110.0130.00725.66
8.2.100.0120.00925.66
8.2.90.0170.00325.66
8.2.80.0100.01025.66
8.2.70.0190.00325.66
8.2.60.0120.00925.66
8.2.50.0110.01125.66
8.2.40.0150.00625.66
8.2.30.0140.00725.66
8.2.20.0100.00725.66
8.2.10.0140.00025.66
8.2.00.0160.00025.66
8.1.330.0090.00823.79
8.1.320.0130.00716.34
8.1.310.0050.00318.59
8.1.300.0120.00318.16
8.1.290.0030.00630.84
8.1.280.0110.00725.92
8.1.270.0110.00325.66
8.1.260.0150.00625.66
8.1.250.0110.00725.66
8.1.240.0070.01725.66
8.1.230.0120.00925.66
8.1.220.0140.00725.66
8.1.210.0130.00625.66
8.1.200.0220.00025.66
8.1.190.0070.01125.66
8.1.180.0100.00725.66
8.1.170.0060.01025.66
8.1.160.0030.01225.66
8.1.150.0030.01025.66
8.1.140.0110.00425.66
8.1.130.0070.00725.66
8.1.120.0040.01125.66
8.1.110.0090.00625.66
8.1.100.0040.01125.66
8.1.90.0040.01125.66
8.1.80.0040.01125.66
8.1.70.0110.00425.66
8.1.60.0060.00925.66
8.1.50.0090.00625.66
8.1.40.0080.00825.66
8.1.30.0150.00025.66
8.1.20.0040.01225.66
8.1.10.0090.00625.66
8.1.00.0040.01125.66

preferences:
80.53 ms | 403 KiB | 5 Q