3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AbilityScore { public $value; public __construct(int $value) { if ($value < 1) throw new AbilityScoreTooLowException('Ability Score should be at least 1'); $this->value = $value; } public function __set($field, $value) { throw new Exception('Not here mate!'); } } $test = new AbilityScore(10); $test->value = 11; $test->buuu = 'asdsada';

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.10.0070.08320.07
7.0.00.0070.05020.07
5.6.160.0070.05720.55
5.6.150.0030.08018.23
5.6.140.0030.07718.27
5.6.130.0030.08318.12
5.6.120.0130.05021.00
5.6.110.0200.05321.02
5.6.100.0070.07721.11
5.6.90.0030.08721.09
5.6.80.0130.07720.42
5.5.300.0100.07318.09
5.5.290.0130.04017.90
5.5.280.0070.03720.65
5.5.270.0070.08720.75
5.5.260.0070.05320.88
5.5.250.0000.04720.49
5.5.240.0130.08020.28

preferences:
143.44 ms | 1394 KiB | 7 Q