3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Enum { private static $cache = []; public static function __callStatic($name, $params) { $className = get_called_class(); if(!isset(self::$cache[$name])) { self::$cache[$name] = new $className($className::$$name); } return self::$cache[$name]; } } class Operator { private const EQUALS = ['=']; private $symbol; private function __const(string $symbol) { $this->symbol = $symbol; } } var_dump(Enum::EQUALS());

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.0110.00718.43
8.3.50.0110.00316.36
8.3.40.0090.00618.93
8.3.30.0110.00318.59
8.3.20.0040.00419.02
8.3.10.0040.00423.66
8.3.00.0050.00319.66
8.2.180.0120.00616.50
8.2.170.0120.00322.96
8.2.160.0070.00720.38
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0030.00620.35
8.2.120.0050.00326.35
8.2.110.0060.00320.52
8.2.100.0080.00317.84
8.2.90.0040.00419.20
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0030.00618.05
8.2.50.0050.00318.10
8.2.40.0030.00522.32
8.2.30.0030.00621.04
8.2.20.0040.00418.00
8.2.10.0040.00418.12
8.2.00.0040.00418.18
8.1.280.0070.01425.92
8.1.270.0070.00022.02
8.1.260.0030.00626.35
8.1.250.0030.00528.09
8.1.240.0030.00621.00
8.1.230.0040.00719.02
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0090.00017.25
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0050.00318.89
8.1.150.0000.00818.88
8.1.140.0000.00819.63
8.1.130.0000.00718.85
8.1.120.0000.00817.48
8.1.110.0070.00017.52
8.1.100.0000.00717.43
8.1.90.0050.00817.45
8.1.80.0040.00417.34
8.1.70.0030.00317.52
8.1.60.0050.00317.52
8.1.50.0040.00417.52
8.1.40.0020.00517.55
8.1.30.0000.00717.67
8.1.20.0040.00417.62
8.1.10.0000.00817.58
8.1.00.0040.00417.42
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00318.44
8.0.270.0030.00317.20
8.0.260.0030.00316.89
8.0.250.0000.00717.05
8.0.240.0080.00017.09
8.0.230.0030.00716.93
8.0.220.0000.00716.96
8.0.210.0040.00416.97
8.0.200.0000.00616.91
8.0.190.0040.00417.08
8.0.180.0080.00016.97
8.0.170.0000.00716.99
8.0.160.0040.00416.98
8.0.150.0000.00716.90
8.0.140.0000.00716.93
8.0.130.0000.00613.48
8.0.120.0000.00716.82
8.0.110.0070.00016.91
8.0.100.0000.00717.00
8.0.90.0000.00716.99
8.0.80.0150.00316.89
8.0.70.0070.00016.84
8.0.60.0000.00716.99
8.0.50.0080.00016.86
8.0.30.0070.01217.28
8.0.20.0120.00717.40
8.0.10.0070.00017.06
8.0.00.0150.00316.64
7.4.330.0050.00015.55
7.4.320.0000.00716.59
7.4.300.0000.00616.49
7.4.290.0090.00016.55
7.4.280.0030.00516.45
7.4.270.0060.00216.60
7.4.260.0060.00013.21
7.4.250.0000.00716.56
7.4.240.0000.00816.58
7.4.230.0000.00716.44
7.4.220.0040.01416.57
7.4.210.0070.01016.58
7.4.200.0000.00716.45
7.4.160.0050.01116.65
7.4.150.0060.01217.40
7.4.140.0080.01017.86
7.4.130.0210.00316.55
7.4.120.0070.01116.55
7.4.110.0070.01016.60
7.4.100.0130.00916.48
7.4.90.0080.00816.42
7.4.80.0100.01719.39
7.4.70.0070.01016.48
7.4.60.0070.01016.38
7.4.50.0040.00716.49
7.4.40.0130.00916.51
7.4.30.0140.00616.73
7.4.00.0050.01214.79
7.3.330.0000.00513.27
7.3.320.0000.00513.18
7.3.310.0000.00816.50
7.3.300.0070.00016.43
7.3.290.0030.00316.46
7.3.280.0090.00816.43
7.3.270.0100.00717.40
7.3.260.0110.00616.69
7.3.250.0080.01116.55
7.3.240.0140.00416.64
7.3.230.0090.00916.55
7.3.210.0070.01016.46
7.3.200.0090.00616.32
7.3.190.0040.01216.51
7.3.180.0130.00616.62
7.3.170.0060.00916.43
7.3.160.0060.01016.67
7.3.120.0070.01114.96
7.3.110.0100.00314.79
7.3.100.0070.01015.04
7.3.90.0040.01214.93
7.3.80.0080.00614.94
7.3.70.0030.00714.98
7.3.60.0130.00614.99
7.3.50.0120.00314.83
7.3.40.0070.00714.91
7.3.30.0060.00314.91
7.3.20.0070.00716.77
7.3.10.0130.00316.70
7.3.00.0060.00916.76
7.2.330.0140.00316.30
7.2.320.0120.00916.80
7.2.310.0130.00316.71
7.2.300.0040.01316.31
7.2.290.0080.00816.38
7.2.250.0090.00915.23
7.2.240.0030.01614.91
7.2.230.0080.00415.30
7.2.220.0040.00815.23
7.2.210.0030.01214.62
7.2.200.0060.00615.16
7.2.190.0100.00914.94
7.2.180.0060.01015.12
7.2.170.0090.00015.13
7.2.110.0430.00316.70
7.2.100.0770.00316.59
7.2.90.0160.00316.59
7.2.80.0180.00316.57
7.2.70.0000.01416.79
7.2.60.0080.00716.85
7.2.50.0140.00616.65
7.2.40.0350.00017.00
7.2.30.0090.00917.04
7.2.20.0330.00616.63
7.2.10.0030.01016.92
7.2.00.0180.00617.87
7.1.330.0090.00615.81
7.1.320.0000.01015.72
7.1.310.0140.00015.48
7.1.300.0070.00715.82
7.1.290.0040.01415.63
7.1.280.0080.00815.70
7.1.270.0050.00815.50
7.1.260.0100.00715.82
7.1.230.1940.00615.64
7.1.220.0070.00715.87
7.1.210.0130.00315.83
7.1.200.0050.00815.73
7.1.190.0120.00615.58
7.1.180.0120.00415.81
7.1.170.0100.00315.35
7.1.160.0090.00615.85
7.1.150.0120.00515.88
7.1.140.0110.00615.54
7.1.130.0120.00415.77
7.1.120.0280.00715.75
7.1.110.0160.00615.84
7.1.100.0100.00716.85
7.1.90.0100.00715.76
7.1.80.0110.00415.61
7.1.70.1240.00515.49
7.1.60.1200.01124.41
7.1.50.1140.01224.43
7.1.40.0160.01224.19
7.1.30.0130.01324.24
7.1.20.1260.01024.32
7.1.10.0070.01015.25
7.1.00.1090.01515.09
7.0.310.0250.00615.45
7.0.300.0090.00414.90
7.0.290.0070.00715.33
7.0.280.0120.00014.99
7.0.270.0140.00315.31
7.0.260.0150.00315.32
7.0.250.0110.00515.25
7.0.240.0230.00015.27
7.0.230.0180.00915.21
7.0.220.0090.01015.21
7.0.210.0110.00615.27
7.0.200.0950.00815.00
7.0.190.0630.00314.82
7.0.180.0100.00814.79
7.0.170.1370.00814.72
7.0.160.0970.01214.59
7.0.150.0060.01214.74
7.0.140.1080.01314.63
7.0.130.0840.01014.89
7.0.120.1030.00714.79
7.0.110.0950.01314.73
7.0.100.0900.01014.64
7.0.90.0790.01014.90
7.0.80.0920.00814.76
7.0.70.1080.01214.79
7.0.60.0850.00814.56
7.0.50.1090.00714.97
7.0.40.0900.01013.87
7.0.30.0760.00513.90
7.0.20.0810.00513.86
7.0.10.0910.00613.70
7.0.00.0820.01213.95
5.6.380.0140.00614.11

preferences:
40.19 ms | 400 KiB | 5 Q