3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?hh namespace Hack\Userid\Quickstart\First; class Box<T> { public function __construct(private T $elem) { } public function get(): T { return $this->elem; } } function get_int(): int { return 42; } function use_box(): void { $box = new Box(get_int()); $i = $box->get(); var_dump($i); } use_box();

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.0.20.0330.07320.10
7.0.10.0070.06020.12
7.0.00.0100.05020.25
5.6.170.0170.04720.55
5.6.160.0100.03720.55
5.6.150.0100.06018.16
5.6.140.0030.04718.15
5.6.130.0030.04318.28
5.6.120.0030.05321.00
5.6.110.0100.08020.95
5.6.100.0170.06021.03
5.6.90.0070.06320.97
5.6.80.0030.07020.36
5.5.310.0270.08720.24
5.5.300.0070.08718.03
5.5.290.0000.04318.05
5.5.280.0070.08320.79
5.5.270.0100.07720.76
5.5.260.0170.07320.84
5.5.250.0030.07320.46
5.5.240.0000.08020.03

preferences:
141.37 ms | 1394 KiB | 7 Q