3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Money { private $amount; public function __construct($amount) { $this->amount = $amount; } public function equals(Money $otherMoney) { return $this->amount === $otherMoney->amount; } } class MonopolyMoney extends Money { } $a = new Money(1); $b = new MonopolyMoney(1); var_dump($a->equals($b)); echo ($a->amount === 1; print $a->amount === 1;

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.0130.03320.34
5.6.160.0100.08320.44
5.6.150.0100.05318.29
5.6.140.0070.08318.30
5.6.130.0100.08018.29
5.6.120.0030.06721.13
5.6.110.0130.07721.04
5.6.100.0030.04321.02
5.6.90.0130.08321.01
5.6.80.0070.07020.38
5.5.300.0070.08018.04
5.5.290.0130.04317.96
5.5.280.0000.06720.97
5.5.270.0200.05320.64
5.5.260.0130.05320.77
5.5.250.0130.08320.71
5.5.240.0230.07020.35

preferences:
138.19 ms | 1398 KiB | 7 Q