3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Singleton { private static $instance; private function __construct() { echo 'NEW!'; } public static function getInstance() { if (null !== self::$instance) { self::$instance = new self; } return self::$instance; } } $cl = function() { return new self; } var_dump(Singleton::getInstance());

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.4.290.0070.04112.52
5.4.280.0120.03512.41
5.4.270.0080.04212.41
5.4.260.0080.03912.41
5.4.250.0080.04012.41
5.4.240.0080.04312.41
5.4.230.0090.03812.41
5.4.220.0110.03912.41
5.4.210.0090.04812.41
5.4.200.0100.04312.41
5.4.190.0130.04612.40
5.4.180.0070.04512.40
5.4.170.0080.04112.41
5.4.160.0120.03412.41
5.4.150.0110.05312.40
5.4.140.0130.04612.09
5.4.130.0100.03812.07
5.4.120.0090.04412.04
5.4.110.0070.03612.04
5.4.100.0060.03712.04
5.4.90.0060.04212.04
5.4.80.0110.05512.04
5.4.70.0080.05012.03
5.4.60.0070.04712.03
5.4.50.0070.04212.03
5.4.40.0050.03912.02
5.4.30.0050.04012.02
5.4.20.0100.04112.01
5.4.10.0080.04912.02
5.4.00.0110.04911.51
5.3.280.0100.04912.71
5.3.270.0140.05912.73
5.3.260.0090.05212.72
5.3.250.0080.05412.72
5.3.240.0120.05012.72
5.3.230.0070.04612.71
5.3.220.0120.04812.68
5.3.210.0120.05012.68
5.3.200.0080.05712.68
5.3.190.0130.05712.68
5.3.180.0080.04012.68
5.3.170.0060.04412.67
5.3.160.0040.04012.67
5.3.150.0070.03712.68
5.3.140.0070.03712.66
5.3.130.0070.04012.66
5.3.120.0080.05212.66
5.3.110.0070.03912.66
5.3.100.0070.05012.13
5.3.90.0070.05012.11
5.3.80.0070.04112.10
5.3.70.0050.04612.10
5.3.60.0080.04112.08
5.3.50.0070.04112.04
5.3.40.0080.05212.03
5.3.30.0100.03711.99
5.3.20.0090.03611.77
5.3.10.0070.03611.73
5.3.00.0090.04911.72

preferences:
142.15 ms | 1394 KiB | 7 Q