3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class MyType { const UNKNOWN = 0; const VALUE_ONE = 1; const VALUE_TWO = 2; const VALUE_THREE = 3; const VALUE_FOUR = 4; const VALUE_FIVE = 5; static public $__names = array( 0 => 'UNKNOWN', 1 => 'VALUE_ONE', 2 => 'VALUE_TWO', 3 => 'VALUE_THREE', 4 => 'VALUE_FOUR', 5 => 'VALUE_FIVE', ); } $test = new MyType(); echo $test->__names[count($test->__names) - 1]; //echo constant('MyType::' . MyType::__names[count($test->__names) - 1]); ?>

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.0120.00316.88
8.3.50.0100.00422.12
8.3.40.0070.00718.97
8.3.30.0110.00419.01
8.3.20.0040.00420.14
8.3.10.0020.00523.71
8.3.00.0060.00320.91
8.2.180.0140.00716.75
8.2.170.0070.00722.96
8.2.160.0030.01022.09
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00319.36
8.2.110.0040.00422.14
8.2.100.0160.00020.43
8.2.90.0040.00419.04
8.2.80.0040.00417.97
8.2.70.0000.00817.62
8.2.60.0090.00017.93
8.2.50.0060.00318.07
8.2.40.0030.00518.03
8.2.30.0000.00718.27
8.2.20.0040.00417.62
8.2.10.0040.00417.96
8.2.00.0030.00519.40
8.1.280.0110.01125.92
8.1.270.0000.00823.85
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0090.00022.19
8.1.230.0080.00319.00
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0070.00317.47
8.1.190.0080.00017.13
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0040.00421.94
8.1.150.0070.00018.51
8.1.140.0000.00717.45
8.1.130.0070.00017.73
8.1.120.0000.00717.47
8.1.110.0030.00317.36
8.1.100.0030.00517.49
8.1.90.0000.00817.35
8.1.80.0000.00717.35
8.1.70.0000.00717.45
8.1.60.0090.00317.53
8.1.50.0050.00317.53
8.1.40.0000.00917.51
8.1.30.0000.00817.63
8.1.20.0000.00917.55
8.1.10.0040.00417.54
8.1.00.0000.00817.55
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0000.00718.38
8.0.270.0030.00317.15
8.0.260.0000.00617.14
8.0.250.0080.00016.86
8.0.240.0000.00716.84
8.0.230.0000.00716.98
8.0.220.0050.00316.90
8.0.210.0070.00016.90
8.0.200.0040.00416.97
8.0.190.0000.00716.84
8.0.180.0040.00416.98
8.0.170.0050.00316.85
8.0.160.0000.00716.95
8.0.150.0070.00016.93
8.0.140.0030.00616.93
8.0.130.0050.00013.37
8.0.120.0000.00716.89
8.0.110.0050.00216.88
8.0.100.0050.00316.91
8.0.90.0040.00416.95
8.0.80.0000.01516.91
8.0.70.0000.00716.91
8.0.60.0000.00716.85
8.0.50.0000.00717.06
8.0.30.0120.00717.03
8.0.20.0050.01517.40
8.0.10.0000.00717.09
8.0.00.0090.00816.80
7.4.330.0020.00215.02
7.4.320.0000.00616.64
7.4.300.0030.00316.49
7.4.290.0000.00616.60
7.4.280.0000.00716.60
7.4.270.0070.00016.43
7.4.260.0000.00716.40
7.4.250.0000.00716.47
7.4.240.0030.00516.60
7.4.230.0000.00716.60
7.4.220.0060.01216.60
7.4.210.0070.01016.60
7.4.200.0070.00016.71
7.4.160.0100.00616.48
7.4.150.0090.00917.40
7.4.140.0080.01317.86
7.4.130.0080.01016.62
7.4.120.0100.01016.62
7.4.110.0140.00316.44
7.4.100.0140.00316.46
7.4.90.0120.00916.55
7.4.80.0100.01019.39
7.4.70.0100.00716.48
7.4.60.0120.00616.41
7.4.50.0030.00616.53
7.4.40.0130.00316.47
7.4.30.0140.00316.54
7.4.00.0000.01515.02
7.3.330.0000.00513.36
7.3.320.0050.00013.11
7.3.310.0030.00316.25
7.3.300.0040.00416.22
7.3.290.0120.00316.36
7.3.280.0120.00616.37
7.3.270.0120.00617.40
7.3.260.0090.01316.38
7.3.250.0090.01116.44
7.3.240.0070.01016.44
7.3.230.0080.01116.39
7.3.210.0160.00316.57
7.3.200.0080.00819.39
7.3.190.0160.00616.39
7.3.180.0110.00616.32
7.3.170.0080.00816.52
7.3.160.0030.01416.43
7.3.120.0070.01014.80
7.3.00.0060.00916.27
7.2.330.0120.01116.88
7.2.320.0060.01216.79
7.2.310.0090.00616.88
7.2.300.0060.01116.39
7.2.290.0070.01016.41
7.2.130.0000.01616.97
7.2.120.0060.01316.66
7.2.110.0040.01116.76
7.2.100.0060.00316.96
7.2.90.0040.01117.11
7.2.80.0030.01116.89
7.2.70.0130.00017.18
7.2.60.0030.00816.92
7.2.50.0120.00317.13
7.2.40.0070.00717.07
7.2.30.0000.01616.92
7.2.20.0040.00816.48
7.2.10.0120.00316.83
7.2.00.0030.01018.22
7.1.250.0000.01315.58
7.1.240.0030.01116.03
7.1.230.0000.00815.74
7.1.220.0070.00715.89
7.1.210.0030.01015.83
7.1.200.0070.00615.70
7.1.190.0030.00715.84
7.1.180.0000.01115.62
7.1.170.0080.00015.82
7.1.160.0040.00815.83
7.1.150.0060.00615.68
7.1.140.0060.00616.01
7.1.130.0040.01115.67
7.1.120.0000.00915.80
7.1.110.0170.00015.58
7.1.100.0060.00716.98
7.1.90.0070.00715.64
7.1.80.0060.00615.84
7.1.70.0030.00716.48
7.1.60.0070.01217.72
7.1.50.0100.00616.26
7.1.40.0060.00615.52
7.1.30.0090.00315.83
7.1.20.0040.00715.55
7.1.10.0060.00915.77
7.1.00.0040.04019.00
7.0.330.0070.00315.40
7.0.320.0060.00615.43
7.0.310.0000.01115.12
7.0.300.0030.01015.36
7.0.290.0030.01015.31
7.0.280.0030.00615.21
7.0.270.0060.00615.50
7.0.260.0060.00815.51
7.0.250.0000.00915.45
7.0.240.0030.01015.34
7.0.230.0040.01115.54
7.0.220.0090.00315.35
7.0.210.0060.00315.30
7.0.200.0080.00315.92
7.0.190.0030.01015.15
7.0.180.0090.00315.44
7.0.170.0130.00015.39
7.0.160.0100.00315.30
7.0.150.0000.01315.19
7.0.140.0070.03718.52
7.0.130.0070.00315.26
7.0.120.0100.00315.43
7.0.110.0050.00515.51
7.0.100.0100.02317.68
7.0.90.0070.03517.64
7.0.80.0110.02317.71
7.0.70.0060.02617.62
7.0.60.0090.04117.67
7.0.50.0210.04517.91
7.0.40.0090.03916.64
7.0.30.0050.02516.58
7.0.20.0050.02516.70
7.0.10.0090.03516.67
7.0.00.0050.03316.71
5.6.380.0000.00914.53
5.6.370.0050.00514.30
5.6.360.0110.00414.54
5.6.350.0100.00014.23
5.6.340.0040.00814.73
5.6.330.0090.00014.23
5.6.320.0070.00714.25
5.6.310.0030.00914.05
5.6.300.0030.00714.49
5.6.290.0040.01114.67
5.6.280.0030.04117.75
5.6.270.0090.00614.68
5.6.260.0040.00414.30
5.6.250.0070.02217.50
5.6.240.0000.03817.59
5.6.230.0050.03017.52
5.6.220.0030.02817.39
5.6.210.0030.02717.42
5.6.200.0030.02517.69
5.6.190.0050.04217.78
5.6.180.0080.02017.57
5.6.170.0030.03917.67
5.6.160.0120.04617.69
5.6.150.0100.04017.58
5.6.140.0130.03017.86
5.6.130.0080.05017.82
5.6.120.0050.03417.53
5.6.110.0050.04117.82
5.6.100.0050.02617.88
5.6.90.0060.02917.73
5.6.80.0070.02017.24
5.6.70.0020.02417.34
5.6.60.0020.04817.31
5.6.50.0030.02417.28
5.6.40.0090.04017.34
5.6.30.0060.03317.34
5.6.20.0080.04117.51
5.6.10.0050.04317.26
5.6.00.0110.01917.25
5.5.380.0070.03416.06
5.5.370.0050.03515.96
5.5.360.0020.04415.97
5.5.350.0060.03315.96
5.5.340.0050.04316.25
5.5.330.0050.04316.24
5.5.320.0030.02516.19
5.5.310.0110.03516.21
5.5.300.0040.03716.19
5.5.290.0080.02216.12
5.5.280.0050.02416.21
5.5.270.0080.04316.24
5.5.260.0120.03916.16
5.5.250.0050.04216.13
5.5.240.0020.02815.81
5.5.230.0120.01515.87
5.5.220.0000.02315.87
5.5.210.0020.03315.87
5.5.200.0060.03815.84
5.5.190.0050.02215.88
5.5.180.0070.03615.87
5.5.170.0100.00011.60
5.5.160.0060.02415.88
5.5.150.0030.02215.84
5.5.140.0100.03015.90
5.5.130.0010.02415.89
5.5.120.0110.01615.93
5.5.110.0030.03715.79
5.5.100.0040.02715.85
5.5.90.0030.02915.86
5.5.80.0050.01915.80
5.5.70.0030.03515.83
5.5.60.0090.03515.80
5.5.50.0150.01515.84
5.5.40.0030.02515.79
5.5.30.0050.04115.76
5.5.20.0090.04015.83
5.5.10.0060.02015.82
5.5.00.0130.03515.83
5.4.450.0030.04415.53
5.4.440.0050.04015.57
5.4.430.0020.02515.55
5.4.420.0050.03515.48
5.4.410.0040.02415.42
5.4.400.0070.02315.35
5.4.390.0020.03015.32
5.4.380.0000.02215.41
5.4.370.0030.03315.36
5.4.360.0030.02515.42
5.4.350.0070.01915.33
5.4.340.0030.02315.25
5.4.330.0030.00611.60
5.4.320.0060.02015.32
5.4.310.0040.02115.33
5.4.300.0050.03715.39
5.4.290.0030.02815.22
5.4.280.0080.03215.37
5.4.270.0010.04115.36
5.4.260.0030.03715.22
5.4.250.0050.02015.39
5.4.240.0080.02015.31
5.4.230.0030.01815.36
5.4.220.0070.01715.38
5.4.210.0020.03315.34
5.4.200.0070.03315.36
5.4.190.0080.03315.41
5.4.180.0070.04215.25
5.4.170.0070.01815.27
5.4.160.0030.03415.34
5.4.150.0070.03015.36
5.4.140.0070.02213.92
5.4.130.0040.02613.89
5.4.120.0090.02614.01
5.4.110.0050.04014.02
5.4.100.0000.02314.06
5.4.90.0070.01814.04
5.4.80.0070.01813.97
5.4.70.0050.02313.99
5.4.60.0070.03513.98
5.4.50.0060.02314.04
5.4.40.0080.03314.03
5.4.30.0060.02314.04
5.4.20.0100.01913.99
5.4.10.0050.03714.04
5.4.00.0080.03813.72
5.3.290.0040.03713.19
5.3.280.0030.03213.08
5.3.270.0020.04513.15
5.3.260.0000.02413.06
5.3.250.0000.02413.08
5.3.240.0080.03213.07
5.3.230.0050.03013.09
5.3.220.0060.03113.11
5.3.210.0020.03213.05
5.3.200.0080.03513.08
5.3.190.0030.04213.04
5.3.180.0080.03513.14
5.3.170.0030.03313.07
5.3.160.0020.03313.07
5.3.150.0020.03213.06
5.3.140.0100.03313.09
5.3.130.0020.02313.05
5.3.120.0030.02313.04
5.3.110.0000.02613.13
5.3.100.0050.03812.86
5.3.90.0060.02812.80
5.3.80.0000.04312.76
5.3.70.0060.02012.76
5.3.60.0040.02212.82
5.3.50.0100.03312.78
5.3.40.0000.03212.79
5.3.30.0040.02212.70
5.3.20.0040.02312.71
5.3.10.0030.02612.58
5.3.00.0070.02012.63
5.2.170.0050.02011.87
5.2.160.0050.03211.87
5.2.150.0030.01611.87
5.2.140.0010.02011.87
5.2.130.0070.01911.87
5.2.120.0050.02311.87
5.2.110.0030.02511.87
5.2.100.0020.01811.87
5.2.90.0070.03311.87
5.2.80.0070.02211.87
5.2.70.0020.02011.87
5.2.60.0050.02511.87
5.2.50.0040.01911.87
5.2.40.0080.02811.87
5.2.30.0060.01811.87
5.2.20.0050.03011.87
5.2.10.0030.02311.87
5.2.00.0090.02811.87
5.1.60.0070.01211.87
5.1.50.0030.02911.87
5.1.40.0030.01511.87
5.1.30.0030.02611.87
5.1.20.0090.01011.87
5.1.10.0030.03311.87
5.1.00.0050.02311.87
5.0.50.0030.01111.87
5.0.40.0020.01211.87
5.0.30.0060.02311.87
5.0.20.0020.01011.87
5.0.10.0020.01511.87
5.0.00.0000.02611.87
4.4.90.0060.01511.87
4.4.80.0020.02211.87
4.4.70.0030.01811.87
4.4.60.0020.01611.87
4.4.50.0030.01411.87
4.4.40.0000.02811.87
4.4.30.0040.01011.87
4.4.20.0060.01511.87
4.4.10.0020.01011.87
4.4.00.0030.02211.87
4.3.110.0010.00811.87
4.3.100.0000.02211.87
4.3.90.0030.01211.87
4.3.80.0030.02211.87
4.3.70.0020.01911.87
4.3.60.0020.01011.87
4.3.50.0050.01611.87
4.3.40.0020.01711.87
4.3.30.0000.01311.87
4.3.20.0040.01511.87
4.3.10.0050.00811.87
4.3.00.0010.01311.87

preferences:
36.46 ms | 401 KiB | 5 Q