3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); namespace TF\Core\Model; trait tObjectID { /** * @TF: {column => id, type => int} */ protected $id; public function getId(): int,null { return $this->id; } public function setId(int $id = NULL) { $this->id = $id; } } abstract class Object { } class Gallery extends Object { use tObjectID; } $x = new Gallery(); $x->setId(10); echo $x->getId(); $x->setId(NULL); echo $x->getId();

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.00.0100.07320.09
5.6.160.0000.05320.71
5.6.150.0070.04018.23
5.6.140.0070.06018.19
5.6.130.0030.04318.21
5.6.120.0030.04021.12
5.6.110.0130.07721.00
5.6.100.0000.08721.03
5.6.90.0130.07720.98
5.6.80.0030.07320.51
5.5.300.0100.07318.08
5.5.290.0170.05318.08
5.5.280.0200.06320.77
5.5.270.0070.07020.84
5.5.260.0000.04320.88
5.5.250.0070.07320.70
5.5.240.0270.05020.28

preferences:
142.25 ms | 1394 KiB | 7 Q