3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Foo { abstract protected static function things(); protected $t; protected function __construct($t) { $this->t = $t; } public function getT() { return $this->t; } public static function all() { return array_map(function($t) { return static($t); }, static::things()); } } class Bar extends Foo { protected static function things() { return [10, 20, 30]; } } $bars = Bar::all(); foreach ($bars as $bar) { echo $bar->getT()."\n"; }

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)
5.6.130.0130.08018.20
5.6.120.0100.08320.99
5.6.110.0130.07721.13
5.6.100.0030.04321.13
5.6.90.0070.07721.05
5.6.80.0070.08020.48
5.6.70.3570.02320.36
5.5.290.0030.08718.05
5.5.280.0100.05320.89
5.5.270.0030.06320.82
5.5.260.0100.08020.85
5.5.250.0070.09020.56
5.5.240.0130.06720.08
5.4.450.1970.04319.55
5.4.440.1930.03319.27
5.4.430.1830.04019.63
5.4.420.2130.04319.48
5.4.410.2070.04319.30
5.4.400.2230.04319.22
5.4.390.2030.03318.84
5.4.380.1930.03718.95
5.4.370.1830.04319.14
5.4.360.1500.04019.24
5.4.350.0070.03319.31
5.4.340.0070.07319.14
5.4.320.0000.04019.08
5.4.310.1400.03719.14
5.4.300.2000.04718.89
5.4.290.2130.03719.30
5.4.280.2100.04719.22
5.4.270.2100.03719.13
5.4.260.1770.04319.09
5.4.250.1900.03719.05
5.4.240.2230.03719.12
5.4.230.1830.04319.24
5.4.220.1830.03319.23
5.4.210.1900.03019.09
5.4.200.2100.04319.21
5.4.190.2070.04019.04
5.4.180.2000.04018.83
5.4.170.1970.04319.23
5.4.160.2030.04018.97
5.4.150.0730.03318.82
5.4.140.0130.06716.43
5.4.130.0000.05316.56
5.4.120.1930.04716.34
5.4.110.1970.03716.41
5.4.100.2070.03716.45
5.4.90.2100.03316.61
5.4.80.1830.04016.44
5.4.70.2070.04316.59
5.4.60.0300.07016.34
5.4.50.0030.07316.21
5.4.40.0070.03016.51
5.4.30.0030.07716.42
5.4.20.0230.05716.42

preferences:
142.98 ms | 1394 KiB | 7 Q