3v4l.org

run code in 300+ PHP versions simultaneously
<?php public function doSomething() { $preconditions = [ [ 'precondition' => false, 'log' => 'some precondition not met' ], [ 'precondition' => true, 'log' => 'some other precondition not met' ] ]; foreach ($preconditions as $precondition) { if (!$precondition['precondition']) { $this->log($precondition['log']); $this->cleanup(); return; } } $this->reallyDoSomething(); }

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.0270.05320.05
7.0.10.0100.08020.10
7.0.00.0070.07720.15
5.6.170.0170.04320.71
5.6.160.0070.08720.51
5.6.150.0130.08018.23
5.6.140.0130.05718.15
5.6.130.0070.08018.21
5.6.120.0070.08321.00
5.6.110.0100.09020.98
5.6.100.0200.05321.02
5.6.90.0170.08020.95
5.6.80.0100.06720.46
5.5.310.0130.07320.34
5.5.300.0100.03717.98
5.5.290.0100.07317.98
5.5.280.0100.06020.77
5.5.270.0030.05720.88
5.5.260.0100.07020.89
5.5.250.0170.07320.54
5.5.240.0170.08320.27

preferences:
133.65 ms | 1398 KiB | 7 Q