3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MySingleton { private static MySingleton $instance; public static function getInstance () { return self::$instance ??= new MySingleton(); } private function __construct () { echo "Does it work?"; } } $instance = MySingleton::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)
8.3.60.0140.00718.43
8.3.50.0090.00616.45
8.3.40.0030.01719.95
8.3.30.0070.00718.65
8.3.20.0050.00324.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.180.0180.00016.75
8.2.170.0000.01518.81
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0090.00018.81
8.2.110.0100.00719.26
8.2.100.0060.00617.84
8.2.90.0030.00617.84
8.2.80.0000.00918.05
8.2.70.0050.00638.11
8.2.60.0090.00532.92
8.2.50.0110.00420.75
8.2.40.0120.00521.61
8.2.30.0090.00621.62
8.2.20.0100.00521.62
8.2.10.0120.00521.64
8.2.00.0130.00421.61
8.1.280.0150.00625.92
8.1.270.0000.00921.98
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0130.00017.45
8.1.230.0060.00620.84
8.1.220.0090.00017.74
8.1.210.0080.00018.96
8.1.200.0050.00748.23
8.1.190.0120.00332.69
8.1.180.0120.00521.31
8.1.170.0120.00521.60
8.1.160.0120.00421.60
8.1.150.0110.00621.60
8.1.140.0130.00421.62
8.1.130.0100.00621.61
8.1.120.0120.00521.59
8.1.110.0120.00521.61
8.1.100.0120.00521.60
8.1.90.0120.00521.63
8.1.80.0120.00421.58
8.1.70.0120.00521.61
8.1.60.0120.00621.62
8.1.50.0130.00521.61
8.1.40.0120.00621.61
8.1.30.0130.00521.62
8.1.20.0130.00521.62
8.1.10.0130.00521.61
8.1.00.0130.00521.62
8.0.300.0000.00819.65
8.0.290.0090.00348.04
8.0.280.0120.00421.29
8.0.270.0120.00521.56
8.0.260.0110.00621.57
8.0.250.0120.00521.57
8.0.240.0120.00521.57
8.0.230.0120.00521.56
8.0.220.0110.00621.56
8.0.210.0120.00521.57
8.0.200.0120.00421.56
8.0.190.0130.00421.56
8.0.180.0110.00621.56
8.0.170.0120.00421.57
8.0.160.0130.00421.57
8.0.150.0130.00421.57
8.0.140.0100.00521.56
8.0.130.0110.00621.57
8.0.120.0130.00421.56
8.0.110.0120.00421.56
8.0.100.0130.00421.56
8.0.90.0120.00521.56
8.0.80.0120.00421.56
8.0.70.0120.00521.56
8.0.60.0120.00421.56
8.0.50.0110.00521.56
8.0.30.0120.00521.56
8.0.20.0120.00521.57
8.0.10.0120.00421.57

preferences:
45.67 ms | 401 KiB | 5 Q