3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Ozzie; use Exception; use ReflectionClass; class Language { const DUTCH = 1; private static $languages_values; public static function getConstName($value) { if (isset(self::$languages_values[$value])) { return self::$languages_values[$value]; } throw new Exception('de value bestaat niet!'); } public static function init() { static $initialized = false; if ( ! $initialized) { $ref_class = new ReflectionClass(self::class); self::$languages_values = array_flip($ref_class->getConstants()); $initialized = true; } } } // ja, dit zet je in het zelfde bestand Language::init(); // nee, dit dan weer niet niet echo Language::getConstName(1), Language::getConstName(42);

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.10.0030.01617.85
8.3.140.0040.00417.16
8.3.130.0080.00018.61
8.3.120.0080.00020.89
8.3.110.0000.01517.04
8.3.100.0000.00824.06
8.3.90.0080.00026.77
8.3.80.0090.00019.36
8.3.70.0140.00418.43
8.3.60.0100.01018.55
8.3.50.0160.00221.27
8.3.40.0100.00718.96
8.3.30.0140.00018.88
8.3.20.0060.00320.38
8.3.10.0000.00821.82
8.3.00.0080.00022.30
8.2.250.0060.00318.38
8.2.240.0110.00717.10
8.2.230.0030.00620.94
8.2.220.0090.00037.54
8.2.210.0080.00026.77
8.2.200.0030.00718.88
8.2.190.0130.00616.63
8.2.180.0140.00718.36
8.2.170.0070.00719.09
8.2.160.0070.00722.96
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.07
8.2.110.0100.00619.45
8.2.100.0110.00017.91
8.2.90.0030.00519.34
8.2.80.0050.00517.97
8.2.70.0040.00417.75
8.2.60.0060.00317.93
8.2.50.0050.00318.07
8.2.40.0000.00718.16
8.2.30.0030.00518.13
8.2.20.0040.00417.80
8.2.10.0000.00717.82
8.2.00.0000.00817.80
8.1.300.0000.00916.00
8.1.290.0030.00630.84
8.1.280.0090.00925.92
8.1.270.0030.00620.45
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00723.78
8.1.230.0070.00420.99
8.1.220.0040.00417.74
8.1.210.0050.00518.77
8.1.200.0000.01017.23
8.1.190.0040.00417.43
8.1.180.0040.00418.85
8.1.170.0030.00618.50
8.1.160.0040.00422.11
8.1.150.0060.00318.56
8.1.140.0040.00420.22
8.1.130.0040.00417.84
8.1.120.0000.00717.34
8.1.110.0000.00717.46
8.1.100.0040.00717.38
8.1.90.0050.00317.47
8.1.80.0070.00017.52
8.1.70.0030.00317.48
8.1.60.0000.00817.63
8.1.50.0040.00417.49
8.1.40.0000.00817.54
8.1.30.0060.00317.62
8.1.20.0000.00817.64
8.1.10.0020.00517.49
8.1.00.0000.00817.43
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0070.00017.32
8.0.260.0060.00016.90
8.0.250.0000.00716.88
8.0.240.0060.00316.97
8.0.230.0050.00217.02
8.0.220.0000.00616.86
8.0.210.0030.00316.96
8.0.200.0000.00717.04
8.0.190.0050.00317.07
8.0.180.0050.00317.04
8.0.170.0000.00716.90
8.0.160.0050.00216.94
8.0.150.0020.00516.92
8.0.140.0050.00516.98
8.0.130.0030.00313.39
8.0.120.0030.00516.87
8.0.110.0040.00416.96
8.0.100.0040.00416.96
8.0.90.0000.00716.80
8.0.80.0030.01317.01
8.0.70.0030.00517.03
8.0.60.0040.00417.01
8.0.50.0070.00017.08
8.0.30.0080.01017.21
8.0.20.0120.00917.40
8.0.10.0000.00717.16
8.0.00.0120.00816.74
7.4.330.0000.00515.00
7.4.320.0030.00316.59
7.4.300.0060.00316.50
7.4.290.0000.00716.59
7.4.280.0040.00416.41
7.4.270.0030.00316.53
7.4.260.0040.00416.64
7.4.250.0040.00416.47
7.4.240.0000.00816.55
7.4.230.0070.00016.43
7.4.220.0120.00616.64
7.4.210.0000.01516.59
7.4.200.0040.00416.41
7.4.190.0080.00016.70
7.4.160.0130.00416.33
7.4.150.0070.01717.40
7.4.140.0070.01517.86
7.4.130.0090.01116.58
7.4.120.0070.01016.55
7.4.110.0180.00716.73
7.4.100.0100.00716.63
7.4.90.0090.01316.48
7.4.80.0060.00919.39
7.4.70.0140.00616.64
7.4.60.0100.00716.48
7.4.50.0030.00316.52
7.4.40.0070.00722.77
7.4.30.0120.00916.45
7.4.00.0040.00814.90
7.3.330.0050.00013.45
7.3.320.0000.00513.43
7.3.310.0000.00716.46
7.3.300.0030.00316.35
7.3.290.0070.00816.41
7.3.280.0090.00616.42
7.3.270.0100.00617.40
7.3.260.0140.00916.57
7.3.250.0140.00816.49
7.3.240.0110.01416.50
7.3.230.0120.00916.51
7.3.210.0100.00616.41
7.3.200.0090.00919.39
7.3.190.0120.01016.36
7.3.180.0060.00916.55
7.3.170.0100.00716.46
7.3.160.0060.00916.62
7.3.120.0060.00915.06
7.2.330.0030.01316.85
7.2.320.0060.01116.76
7.2.310.0090.01216.84
7.2.300.0100.00716.79
7.2.290.0200.00316.76
7.2.110.0100.00616.70
7.2.60.0070.00717.08
7.1.200.0100.00315.93
7.1.70.0030.00317.18
7.1.60.0090.01519.50
7.1.50.0060.01216.95
7.1.00.0030.06022.37
7.0.200.0040.00416.94
7.0.140.0070.07022.09
7.0.60.0130.06319.90
7.0.50.0130.08017.88
7.0.40.0100.08720.03
7.0.30.0270.07720.09
7.0.20.0200.04020.17
7.0.10.0200.08720.10
7.0.00.0270.04020.23
5.6.280.0100.06721.16
5.6.210.0200.03720.70
5.6.200.0230.04718.21
5.6.190.0000.05020.63
5.6.180.4030.04320.58
5.6.170.0270.07720.54
5.6.160.0100.08720.46
5.6.150.0070.04018.21
5.6.140.0000.04318.17
5.6.130.0000.05018.27
5.6.120.0070.05321.02
5.6.110.0000.05020.98
5.6.100.0100.07020.96
5.6.90.0000.09020.88
5.6.80.0030.08320.39
5.6.70.0170.06720.40
5.5.350.0070.08020.44
5.5.340.0000.07717.99
5.5.330.0000.06320.23
5.5.320.0200.07320.51
5.5.310.0230.04020.50
5.5.300.0070.08018.06
5.5.290.0200.03718.02
5.5.280.0030.05020.97
5.5.270.0070.04320.80
5.5.260.0100.08020.89
5.5.250.0070.04020.69
5.5.240.0070.05720.13
5.4.450.0970.06719.59
5.4.440.0730.06319.45
5.4.430.0470.06719.38
5.4.420.0870.05319.61
5.4.410.0800.06019.35
5.4.400.1070.05718.67
5.4.390.1330.05018.55
5.4.380.0300.06318.73
5.4.370.0070.06018.56
5.4.360.0070.06018.82
5.4.350.0070.03912.04
5.4.340.0080.04112.03
5.4.320.0070.03812.52
5.4.310.0080.04312.52
5.4.300.0050.04112.52
5.4.290.0080.04212.52
5.4.280.0040.03812.39
5.4.270.0090.03612.39
5.4.260.0080.04012.38
5.4.250.0060.04112.39
5.4.240.0030.03812.39
5.4.230.0090.04412.38
5.4.220.0050.03812.38
5.4.210.0060.03612.38
5.4.200.0110.03412.38
5.4.190.0060.03812.37
5.4.180.0050.04112.37
5.4.170.0080.03612.38
5.4.160.0100.03412.38
5.4.150.0040.03812.38
5.4.140.0060.03812.06
5.4.130.0070.03812.05
5.4.120.0100.03912.01
5.4.110.0040.03612.01
5.4.100.0090.03412.01
5.4.90.0060.03912.01
5.4.80.0080.03612.01
5.4.70.0050.03612.00
5.4.60.0070.03312.00
5.4.50.0080.03412.00
5.4.40.0040.03811.99
5.4.30.0090.04711.99
5.4.20.0040.03711.98
5.4.10.0120.03111.98
5.4.00.0060.03611.48
5.3.290.0070.04912.80
5.3.280.0070.03812.71
5.3.270.0090.03712.72
5.3.260.0060.04012.72
5.3.250.0040.04012.71
5.3.240.0060.03912.72
5.3.230.0070.04012.71
5.3.220.0070.03612.68
5.3.210.0090.03512.68
5.3.200.0060.03712.68
5.3.190.0090.03612.68
5.3.180.0080.03912.68
5.3.170.0100.04412.67
5.3.160.0100.04912.68
5.3.150.0110.04112.67
5.3.140.0110.03712.66
5.3.130.0040.04512.66
5.3.120.0060.04212.66
5.3.110.0100.04712.66
5.3.100.0100.04712.12
5.3.90.0090.05612.08
5.3.80.0110.04412.08
5.3.70.0070.04912.07
5.3.60.0100.04512.06
5.3.50.0130.04512.00
5.3.40.0050.04012.00
5.3.30.0060.03711.96
5.3.20.0070.03511.74
5.3.10.0050.03711.71
5.3.00.0050.03911.70
5.2.170.0060.0299.15
5.2.160.0070.0319.15
5.2.150.0040.0329.15
5.2.140.0070.0319.14
5.2.130.0060.0299.11
5.2.120.0040.0299.11
5.2.110.0040.0309.11
5.2.100.0060.0299.11
5.2.90.0060.0279.11
5.2.80.0060.0319.11
5.2.70.0050.0379.11
5.2.60.0060.0299.06
5.2.50.0040.0329.04
5.2.40.0050.0299.01
5.2.30.0040.0308.98
5.2.20.0050.0288.97
5.2.10.0060.0318.90
5.2.00.0030.0318.76
5.1.60.0010.0278.04
5.1.50.0060.0238.04
5.1.40.0050.0238.03
5.1.30.0040.0268.37
5.1.20.0060.0268.40
5.1.10.0040.0268.12
5.1.00.0020.0268.12
5.0.50.0040.0236.60
5.0.40.0040.0186.46
5.0.30.0030.0346.27
5.0.20.0010.0216.25
5.0.10.0070.0196.23
5.0.00.0020.0316.21
4.4.90.0040.0144.78
4.4.80.0030.0144.75
4.4.70.0020.0164.75
4.4.60.0040.0144.75
4.4.50.0020.0174.77
4.4.40.0020.0284.70
4.4.30.0060.0204.76
4.4.20.0050.0164.84
4.4.10.0040.0224.85
4.4.00.0020.0264.76
4.3.110.0020.0174.67
4.3.100.0040.0144.66
4.3.90.0010.0174.64
4.3.80.0020.0304.58
4.3.70.0040.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0174.63
4.3.40.0030.0244.54
4.3.30.0020.0173.27
4.3.20.0020.0163.25
4.3.10.0010.0173.21
4.3.00.0100.0206.91

preferences:
53.8 ms | 403 KiB | 5 Q