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 { return $this->id; } public function setId(int, null $id) { $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.0070.09020.08
5.6.160.0030.07020.48
5.6.150.0000.06718.14
5.6.140.0230.05718.29
5.6.130.0100.03318.14
5.6.120.0070.03720.90
5.6.110.0170.08721.03
5.6.100.0130.08321.13
5.6.90.0070.07321.09
5.6.80.0070.04320.44
5.5.300.0070.03718.04
5.5.290.0030.08018.01
5.5.280.0030.09020.88
5.5.270.0300.06720.76
5.5.260.0030.04720.87
5.5.250.0170.07020.58
5.5.240.0170.04320.28

preferences:
140.55 ms | 1394 KiB | 7 Q