3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const OFF = -2147483647; // Logging is turned Off const OFF_STR = 'OFF'; const FATAL = -1; // Identical to Emergency const FATAL_STR = 'FATAL'; const EMERGENCY = 0; // System is unusable const EMERGENCY_STR = 'EMERGENCY'; const ALERT = 100; // Action Must be Taken Immediately const ALERT_STR = 'ALERT'; const CRITICAL = 200; // Critical Conditions const CRITICAL_STR = 'CRITICAL'; const ERROR = 300; // Error Conditions const ERROR_STR = 'ERROR'; const WARNING = 400; // Warning Conditions const WARNING_STR = 'WARNING'; const NOTICE = 500; // Normal, but significant conditions const NOTICE_STR = 'NOTICE'; const INFO = 600; // Informational messages const INFO_STR = 'INFO'; const DEBUG = 700; // Debug Level Messages const DEBUG_STR = 'DEBUG'; const TRACE = 800; // Trace Level Messages const TRACE_STR = 'TRACE'; const ALL = 2147483647; // Every Possible Log Level const ALL_STR = 'ALL'; private function Test($level, $levelStr){ $this->level = $level; $this->levelStr = $levelStr; } public static function getSomething(){ $cName = 'SOMETHING'; $sName = 'something'; self::setMap($cName,$sName); return self::$someMap[constant('Test::'.$cName)]; } public static function initLevelMap(){ $oClass = new ReflectionClass (__CLASS__); $constants = $oClass->getConstants(); var_dump($constants); } public static function setMap($cName,$sName){ if(!isset(self::$someMap[constant('Test::'.$cName)])) { print "setting it"; self::$someMap[constant('Test::'.$cName)] = new Test(constant('Test::'.$cName), $sName); } return self::$someMap; } } Test::initLevelMap();

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.0100.01016.75
8.3.50.0100.00822.84
8.3.40.0040.01118.57
8.3.30.0070.00719.07
8.3.20.0050.00320.16
8.3.10.0050.00321.72
8.3.00.0040.00419.13
8.2.180.0110.01116.50
8.2.170.0000.01822.96
8.2.160.0150.00020.45
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0000.00820.97
8.2.110.0000.00822.22
8.2.100.0130.00317.78
8.2.90.0040.00419.24
8.2.80.0030.00517.97
8.2.70.0090.00017.50
8.2.60.0040.00717.91
8.2.50.0080.00018.07
8.2.40.0000.00818.22
8.2.30.0040.00417.95
8.2.20.0030.00517.63
8.2.10.0000.00817.87
8.2.00.0030.00617.57
8.1.280.0070.01125.92
8.1.270.0060.00323.95
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0030.00623.87
8.1.230.0090.00319.16
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.22
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0080.00018.39
8.1.160.0070.00022.00
8.1.150.0080.00018.73
8.1.140.0050.00317.22
8.1.130.0070.00017.82
8.1.120.0050.00217.39
8.1.110.0050.00317.45
8.1.100.0000.00717.40
8.1.90.0050.00317.30
8.1.80.0000.00717.39
8.1.70.0030.00317.23
8.1.60.0000.00817.56
8.1.50.0000.00917.51
8.1.40.0060.00317.52
8.1.30.0000.00917.63
8.1.20.0000.00817.65
8.1.10.0030.00517.61
8.1.00.0080.00417.34
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0030.00318.43
8.0.270.0000.00817.06
8.0.260.0030.00317.25
8.0.250.0050.00316.78
8.0.240.0000.00716.87
8.0.230.0040.00416.74
8.0.220.0030.00316.84
8.0.210.0000.00716.76
8.0.200.0030.00316.89
8.0.190.0030.00616.88
8.0.180.0000.00816.93
8.0.170.0020.00516.80
8.0.160.0000.00716.72
8.0.150.0000.00716.76
8.0.140.0040.00416.65
8.0.130.0050.00013.34
8.0.120.0060.00316.79
8.0.110.0000.00716.79
8.0.100.0000.00716.83
8.0.90.0000.00716.89
8.0.80.0160.00616.89
8.0.70.0000.00816.73
8.0.60.0050.00316.70
8.0.50.0030.00516.74
8.0.30.0150.00416.98
8.0.20.0080.01517.40
8.0.10.0040.00416.79
8.0.00.0120.00616.68
7.4.330.0030.00315.14
7.4.320.0030.00316.46
7.4.300.0030.00316.58
7.4.290.0040.00416.59
7.4.280.0030.00616.49
7.4.270.0040.00416.50
7.4.260.0070.00016.62
7.4.250.0000.00816.36
7.4.240.0040.00416.62
7.4.230.0030.00316.39
7.4.220.0180.00616.66
7.4.210.0060.01216.60
7.4.200.0000.00816.34
7.4.160.0130.00316.61
7.4.150.0150.00317.40
7.4.140.0090.01017.86
7.4.130.0160.00316.47
7.4.120.0110.00916.51
7.4.110.0070.01116.43
7.4.100.0080.01116.31
7.4.90.0100.01016.43
7.4.80.0100.01319.39
7.4.70.0120.00516.38
7.4.60.0070.01116.50
7.4.50.0030.00616.59
7.4.40.0100.00716.51
7.4.30.0090.00916.42
7.4.00.0090.00915.09
7.3.330.0030.00313.29
7.3.320.0050.00013.37
7.3.310.0000.00816.20
7.3.300.0060.00016.34
7.3.290.0160.00316.32
7.3.280.0040.01116.28
7.3.270.0040.01517.40
7.3.260.0160.00316.28
7.3.250.0080.00916.23
7.3.240.0140.00716.52
7.3.230.0100.00716.39
7.3.210.0130.00616.34
7.3.200.0060.01219.39
7.3.190.0080.01116.30
7.3.180.0130.00616.22
7.3.170.0070.01016.32
7.3.160.0120.00616.29
7.3.120.0090.00614.57
7.3.110.0060.01014.79
7.3.100.0060.00814.43
7.3.90.0070.00714.67
7.3.80.0070.00814.70
7.3.70.0050.01114.69
7.3.60.0030.01014.55
7.3.50.0090.00614.70
7.3.40.0030.01014.68
7.3.30.0040.01014.59
7.3.20.0050.00916.47
7.3.10.0050.00916.59
7.3.00.0000.01216.54
7.2.330.0080.01116.38
7.2.320.0050.01216.71
7.2.310.0060.01216.66
7.2.300.0150.00316.73
7.2.290.0120.00616.59
7.2.250.0070.01114.92
7.2.240.0060.01314.68
7.2.230.0070.00614.95
7.2.220.0030.01014.71
7.2.210.0050.01014.87
7.2.200.0070.00714.71
7.2.190.0050.01214.81
7.2.180.0080.00514.99
7.2.170.0060.01114.99
7.2.130.0070.01016.94
7.2.120.0060.00916.87
7.2.110.0030.01417.00
7.2.100.0000.01416.89
7.2.90.0030.01016.81
7.2.80.0100.00316.64
7.2.70.0070.00316.97
7.2.60.0150.00516.82
7.2.50.0000.01316.84
7.2.40.0040.01116.61
7.2.30.0060.00317.02
7.2.20.0140.00016.88
7.2.10.0090.00616.77
7.2.00.0090.00416.52
7.1.330.0020.01215.72
7.1.320.0060.00615.59
7.1.310.0050.00915.71
7.1.300.0040.01115.78
7.1.290.0020.01115.63
7.1.280.0060.00515.77
7.1.270.0040.00715.54
7.1.260.0000.01115.77
7.1.250.0060.00315.68
7.1.200.0030.01315.65
7.1.100.0000.01118.31
7.1.70.0000.00817.13
7.1.60.0070.01719.40
7.1.50.0100.01316.43
7.1.00.0030.07722.37
7.0.200.0000.00716.68
7.0.140.0030.07722.14
7.0.60.0070.03719.85
7.0.50.0030.05317.91
7.0.40.0030.06320.29
7.0.30.0300.06020.26
7.0.20.0300.04720.25
7.0.10.0070.09020.30
7.0.00.0070.08720.29
5.6.280.0000.07720.83
5.6.210.0030.08320.77
5.6.200.0130.05018.18
5.6.190.0130.06320.65
5.6.180.0270.04320.39
5.6.170.0230.03320.41
5.6.160.0100.08320.39
5.6.150.0030.04018.13
5.6.140.0030.03718.23
5.6.130.0070.04718.18
5.6.120.0100.07320.96
5.6.110.0100.08320.98
5.6.100.0000.04321.02
5.6.90.0070.07320.86
5.6.80.0100.03320.42
5.5.350.0000.04720.45
5.5.340.0000.04318.09
5.5.330.0030.05320.13
5.5.320.0370.07720.36
5.5.310.0300.07320.37
5.5.300.0100.04317.98
5.5.290.0100.03318.01
5.5.280.0030.04720.80
5.5.270.0030.04020.91
5.5.260.0100.08020.88
5.5.250.0170.05020.49
5.5.240.0200.04020.27
5.4.450.0300.03319.58
5.4.440.0230.04319.27
5.4.430.0230.04719.33
5.4.420.0200.04719.54
5.4.410.0300.04019.28
5.4.400.0170.03719.15
5.4.390.0430.04018.86
5.4.380.0270.06018.79
5.4.370.0500.06718.76
5.4.360.0370.05718.51
5.4.350.0430.06718.76
5.4.340.0470.05718.76
5.4.320.0060.04112.52
5.4.310.0080.04612.51
5.4.300.0070.03612.52
5.4.290.0090.04912.50
5.4.280.0070.03612.41
5.4.270.0030.04012.40
5.4.260.0050.03812.41
5.4.250.0070.04012.40
5.4.240.0060.03612.41
5.4.230.0070.03612.39
5.4.220.0070.03612.40
5.4.210.0050.03712.39
5.4.200.0070.03712.40
5.4.190.0060.04012.39
5.4.180.0080.03412.39
5.4.170.0080.03512.41
5.4.160.0100.03412.40
5.4.150.0090.03512.40
5.4.140.0060.04612.09
5.4.130.0050.04112.07
5.4.120.0070.03612.02
5.4.110.0090.03312.02
5.4.100.0050.04212.02
5.4.90.0060.03812.02
5.4.80.0100.03512.02
5.4.70.0070.03612.02
5.4.60.0090.03312.02
5.4.50.0040.03612.02
5.4.40.0060.03912.01
5.4.30.0040.03712.00
5.4.20.0050.03612.00
5.4.10.0060.03812.01
5.4.00.0050.03711.49
5.3.290.0110.03512.80
5.3.280.0040.04112.71
5.3.270.0020.04412.73
5.3.260.0120.03712.72
5.3.250.0060.04212.71
5.3.240.0050.03912.72
5.3.230.0060.04012.71
5.3.220.0090.04112.68
5.3.210.0070.03812.68
5.3.200.0050.03912.68
5.3.190.0100.03412.68
5.3.180.0060.03712.67
5.3.170.0060.03712.67
5.3.160.0060.03712.67
5.3.150.0030.04112.67
5.3.140.0100.03312.66
5.3.130.0040.04112.66
5.3.120.0050.04012.66
5.3.110.0080.04112.66
5.3.100.0040.03912.14
5.3.90.0030.03912.12
5.3.80.0050.03712.11
5.3.70.0050.03712.11
5.3.60.0050.03712.09
5.3.50.0050.03712.03
5.3.40.0090.03812.04
5.3.30.0060.03412.00
5.3.20.0090.03811.77
5.3.10.0060.04111.75
5.3.00.0060.04011.73
5.2.170.0060.0329.23
5.2.160.0070.0349.24
5.2.150.0080.0299.23
5.2.140.0040.0369.23
5.2.130.0030.0309.19
5.2.120.0090.0329.20
5.2.110.0100.0279.20
5.2.100.0050.0299.18
5.2.90.0050.0289.19
5.2.80.0040.0309.18
5.2.70.0040.0319.19
5.2.60.0060.0309.15
5.2.50.0040.0309.11
5.2.40.0080.0279.09
5.2.30.0020.0339.06
5.2.20.0050.0289.05
5.2.10.0060.0278.96
5.2.00.0060.0288.82
5.1.60.0060.0228.11
5.1.50.0050.0258.10
5.1.40.0050.0278.09
5.1.30.0050.0318.43
5.1.20.0050.0268.46
5.1.10.0050.0308.18
5.1.00.0050.0278.18
5.0.50.0050.0226.65
5.0.40.0050.0206.52
5.0.30.0050.0296.33
5.0.20.0020.0216.30
5.0.10.0040.0206.28
5.0.00.0050.0296.27
4.4.90.0040.0144.78
4.4.80.0010.0174.75
4.4.70.0030.0154.76
4.4.60.0030.0154.75
4.4.50.0030.0154.77
4.4.40.0040.0244.70
4.4.30.0020.0164.76
4.4.20.0040.0154.84
4.4.10.0030.0154.85
4.4.00.0010.0284.76
4.3.110.0020.0174.67
4.3.100.0020.0224.66
4.3.90.0030.0154.64
4.3.80.0020.0254.59
4.3.70.0030.0154.63
4.3.60.0010.0174.63
4.3.50.0050.0134.63
4.3.40.0030.0244.54
4.3.30.0020.0163.30
4.3.20.0020.0163.28
4.3.10.0040.0153.24
4.3.00.0070.01315.90

preferences:
40.6 ms | 401 KiB | 5 Q