3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ISingleton { public static function getInstance(): ISingleton; } abstract class Singleton implements ISingleton { private static $_instances = []; final private function __construct () {} final private function __clone() {} final private function __wakeup() {} final public static function getInstance() : ISingleton { self::$_instances[static::class] = self::$_instances[static::class] ?? new static(); return self::$_instances[static::class]; } } class Flextype extends Singleton { } var_export(Flextype::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.4.120.0090.01020.66
8.4.110.0080.01319.01
8.4.100.0110.00817.93
8.4.90.0110.00818.21
8.4.80.0140.00518.17
8.4.70.0080.00818.18
8.4.60.0140.00719.03
8.4.50.0110.01018.49
8.4.40.0090.00317.91
8.4.30.0040.00417.61
8.4.20.0100.00719.84
8.4.10.0130.00717.88
8.3.250.0110.00719.13
8.3.240.0100.01016.68
8.3.230.0110.01016.83
8.3.220.0080.01016.99
8.3.210.0120.00616.66
8.3.200.0060.00316.88
8.3.190.0100.00817.32
8.3.180.0050.00917.25
8.3.170.0180.00020.71
8.3.160.0110.00718.54
8.3.150.0110.00717.05
8.3.140.0040.00416.80
8.3.130.0030.00618.47
8.3.120.0090.00020.59
8.3.110.0050.00520.94
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0030.00618.68
8.3.70.0070.00716.63
8.3.60.0060.01218.43
8.3.50.0100.00718.30
8.3.40.0120.00318.79
8.3.30.0100.00718.80
8.3.20.0040.00419.24
8.3.10.0070.00019.33
8.3.00.0040.00423.56
8.2.290.0130.00620.39
8.2.280.0130.00618.54
8.2.270.0070.01117.16
8.2.260.0080.00016.77
8.2.250.0040.00418.41
8.2.240.0060.00318.96
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0030.00526.77
8.2.200.0030.00616.63
8.2.190.0170.00316.75
8.2.180.0110.01116.88
8.2.170.0090.00622.96
8.2.160.0030.01019.29
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0040.00421.09
8.2.110.0190.00022.03
8.2.100.0090.00318.03
8.2.90.0030.00517.88
8.2.80.0040.00418.92
8.2.70.0040.00418.16
8.2.60.0040.00417.93
8.2.50.0040.00419.35
8.2.40.0000.00819.42
8.2.30.0040.00419.50
8.2.20.0030.00518.19
8.2.10.0040.00418.13
8.2.00.0030.00519.38
8.1.330.0110.00816.77
8.1.320.0110.00516.07
8.1.310.0080.00416.29
8.1.300.0060.00318.09
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0040.00422.02
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0110.00020.89
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00517.35
8.1.190.0050.00317.38
8.1.180.0000.00818.10
8.1.170.0060.00318.66
8.1.160.0040.00418.79
8.1.150.0070.00018.83
8.1.140.0040.00417.55
8.1.130.0030.00318.96
8.1.120.0040.00417.32
8.1.110.0050.00317.43
8.1.100.0040.00417.41
8.1.90.0030.00517.45
8.1.80.0050.00217.42
8.1.70.0000.00817.29
8.1.60.0040.00817.50
8.1.50.0000.00717.54
8.1.40.0000.00817.36
8.1.30.0040.00417.56
8.1.20.0000.00717.65
8.1.10.0040.00417.61
8.1.00.0030.00517.53
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0000.00818.45
8.0.270.0000.00717.17
8.0.260.0000.00617.14
8.0.250.0000.00716.92
8.0.240.0000.00716.93
8.0.230.0030.00317.04
8.0.220.0000.00716.96
8.0.210.0000.00816.86
8.0.200.0070.00017.02
8.0.190.0080.00017.06
8.0.180.0050.00316.97
8.0.170.0000.00816.94
8.0.160.0040.00416.98
8.0.150.0030.00316.96
8.0.140.0040.00416.96
8.0.130.0050.00013.38
8.0.120.0030.00716.89
8.0.110.0030.00616.91
8.0.100.0070.00017.02
8.0.90.0020.00516.92
8.0.80.0110.00717.00
8.0.70.0000.00817.07
8.0.60.0000.00717.06
8.0.50.0040.00416.98
8.0.30.0120.00717.22
8.0.20.0090.01417.40
8.0.10.0070.00016.92
8.0.00.0090.00916.72
7.4.330.0040.00015.55
7.4.320.0030.00316.59
7.4.300.0000.00616.52
7.4.290.0000.00716.61
7.4.280.0040.00416.45
7.4.270.0030.00716.54
7.4.260.0030.00316.60
7.4.250.0030.00316.48
7.4.240.0030.00516.57
7.4.230.0000.00716.50
7.4.220.0000.00716.48
7.4.210.0020.01316.52
7.4.200.0000.00716.41
7.4.160.0050.01116.55
7.4.140.0110.00917.86
7.4.130.0130.00316.55
7.4.120.0090.01116.57
7.4.110.0060.01216.61
7.4.100.0070.01116.40
7.4.90.0070.01016.57
7.4.80.0160.01619.39
7.4.70.0090.01216.60
7.4.60.0130.01016.70
7.4.50.0060.01216.58
7.4.40.0140.00316.42
7.4.00.0030.01415.00
7.3.330.0000.00513.23
7.3.320.0040.00413.27
7.3.310.0050.00316.39
7.3.300.0000.00616.36
7.3.290.0030.00316.28
7.3.280.0110.00316.38
7.3.260.0100.00816.41
7.3.240.0070.00916.51
7.3.230.0100.00716.30
7.3.210.0170.00716.39
7.3.200.0120.00616.41
7.3.190.0170.00316.50
7.3.180.0130.00616.26
7.3.170.0030.01316.26
7.3.160.0120.00316.43
7.3.120.0170.00014.84
7.3.110.0030.01414.67
7.3.100.0000.01714.96
7.3.90.0090.00614.49
7.3.80.0090.01214.85
7.3.70.0060.00314.79
7.3.60.0120.00414.76
7.3.50.0090.00914.79
7.3.40.0100.01014.78
7.3.30.0100.01014.78
7.3.20.0070.01016.70
7.3.10.0110.00416.49
7.3.00.0090.00616.69
7.2.330.0110.00716.79
7.2.320.0070.01016.61
7.2.310.0060.01116.70
7.2.300.0030.01316.39
7.2.290.0080.00816.58
7.2.250.0070.01014.67
7.2.240.0090.00914.93
7.2.230.0080.00814.74
7.2.220.0030.01014.90
7.2.210.0060.00615.07
7.2.200.0030.00915.12
7.2.190.0030.00915.16
7.2.180.0110.00715.05
7.2.170.0040.01515.02
7.2.60.1880.01015.08
7.2.50.2080.00615.09
7.2.40.2570.00915.00
7.2.30.1950.00614.87
7.2.20.2040.00914.95
7.2.10.1820.00814.85
7.2.00.2340.00515.00
7.1.330.0090.00615.83
7.1.320.0110.00416.00
7.1.310.0070.00715.63
7.1.300.0060.00915.88
7.1.290.0000.01515.82
7.1.280.0060.00615.91
7.1.270.0030.01015.89
7.1.260.0030.01415.89
7.1.200.0130.00015.82
7.1.170.1990.00813.72
7.1.160.2110.00713.89
7.1.150.1810.00814.07
7.1.140.1950.00514.07
7.1.130.2530.00813.90
7.1.120.2030.00413.96
7.1.110.2070.00714.01
7.1.100.1760.00414.05
7.1.90.2310.01013.94
7.1.80.2650.01213.77
7.1.70.2010.00913.99
7.1.60.1940.01431.56
7.1.50.2470.01831.83
7.1.40.0610.01631.91
7.1.30.3210.01231.88
7.1.20.0270.01131.67
7.1.10.2270.00613.90
7.1.00.0130.00813.60

preferences:
28.09 ms | 403 KiB | 5 Q