3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { private array $data = []; public function __set(string $name, $value): void { $this->data[$name] = $value; } public function __isset(string $name): bool { return isset($this->data[$name]); } public function __unset(string $name): void { unset($this->data[$name]); } } $foo = new Foo(); $foo->1 = 'one'; $foo->2 = 'two'; var_dump( isset($foo->1), // true isset($foo->2) // true ); unset($foo->1); var_dump( isset($foo->1) // false );

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)
7.4.40.0090.00616.47
7.4.30.0060.00916.31
7.4.20.0110.00816.16
7.4.10.0090.00616.43
7.4.00.0090.00616.45
7.3.160.0060.00916.12
7.3.150.0120.00416.23
7.3.140.0030.01716.38
7.3.130.0150.00016.07
7.3.120.0070.00716.25
7.3.110.0130.01016.14
7.3.100.0000.01616.30
7.3.90.0100.01016.09
7.3.80.0060.00916.14
7.3.70.0120.00616.25
7.3.60.0070.01016.19
7.3.50.0080.00816.17
7.3.40.0030.01316.18
7.3.30.0060.01016.17
7.3.20.0120.00616.00
7.3.10.0030.01416.00
7.3.00.0150.00616.19
7.2.290.0060.01016.45
7.2.280.0100.00716.30
7.2.270.0030.01316.43
7.2.260.0030.01216.44
7.2.250.0110.01016.37
7.2.240.0130.00316.15
7.2.230.0140.00316.48
7.2.220.0070.01016.31
7.2.210.0160.00616.38
7.2.200.0120.00416.40
7.2.190.0100.00716.43
7.2.180.0100.00616.13
7.2.170.0070.01316.33
7.2.160.0100.01116.36
7.2.150.0100.01016.23
7.2.140.0150.00316.29
7.2.130.0070.01016.32
7.2.120.0100.00716.32
7.2.110.0060.01116.24
7.2.100.0060.01016.39
7.2.90.0040.01516.50
7.2.80.0070.01016.24
7.2.70.0080.00816.41
7.2.60.0150.00316.18
7.2.50.0070.01416.36
7.2.40.0180.00016.44
7.2.30.0110.01116.35
7.2.20.0040.01216.36
7.2.10.0080.00916.23
7.2.00.0060.01216.32

preferences:
142.79 ms | 1394 KiB | 7 Q