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 constant($test.$test->__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.0030.01416.75
8.3.50.0110.00717.32
8.3.40.0060.00918.67
8.3.30.0040.01118.48
8.3.20.0080.00018.60
8.3.10.0060.00318.77
8.3.00.0090.00019.38
8.2.180.0120.00316.63
8.2.170.0040.01122.96
8.2.160.0120.00318.79
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0070.00019.66
8.2.110.0040.00420.90
8.2.100.0110.00018.03
8.2.90.0050.00319.51
8.2.80.0060.00318.16
8.2.70.0030.00517.63
8.2.60.0060.00317.63
8.2.50.0030.00617.63
8.2.40.0040.00417.63
8.2.30.0030.00617.73
8.2.20.0050.00517.61
8.2.10.0000.00717.69
8.2.00.0030.00617.84
8.1.280.0060.00925.92
8.1.270.0050.00323.99
8.1.260.0140.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.98
8.1.230.0000.01222.42
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.10
8.1.180.0000.00918.10
8.1.170.0040.00418.58
8.1.160.0030.00518.72
8.1.150.0040.00418.64
8.1.140.0030.00617.43
8.1.130.0000.00717.45
8.1.120.0050.00217.45
8.1.110.0040.00417.51
8.1.100.0030.00317.34
8.1.90.0030.00517.36
8.1.80.0050.00317.45
8.1.70.0070.00017.41
8.1.60.0000.00817.40
8.1.50.0000.00717.49
8.1.40.0000.00717.53
8.1.30.0050.00317.67
8.1.20.0030.01017.48
8.1.10.0000.00817.54
8.1.00.0030.00517.49
8.0.300.0070.00019.74
8.0.290.0080.00016.75
8.0.280.0000.00717.99
8.0.270.0070.00017.18
8.0.260.0040.00416.76
8.0.250.0090.00016.92
8.0.240.0050.00316.82
8.0.230.0070.00016.86
8.0.220.0000.00716.89
8.0.210.0000.00716.87
8.0.200.0060.00316.87
8.0.190.0030.00317.00
8.0.180.0050.00316.98
8.0.170.0000.01016.86
8.0.160.0040.00416.95
8.0.150.0080.00016.91
8.0.140.0020.00516.92
8.0.130.0030.00313.44
8.0.120.0000.00816.91
8.0.110.0030.00517.01
8.0.100.0000.00816.98
8.0.90.0050.00316.99
8.0.80.0070.00716.96
8.0.70.0030.00516.82
8.0.60.0030.00616.81
8.0.50.0030.00516.98
8.0.30.0070.01016.93
8.0.20.0140.01017.03
8.0.10.0030.00317.08
8.0.00.0090.01116.86
7.4.330.0040.00413.02
7.4.320.0030.00316.48
7.4.300.0040.00416.49
7.4.290.0030.00716.50
7.4.280.0040.00416.59
7.4.270.0030.00516.55
7.4.260.0080.00013.29
7.4.250.0050.00316.49
7.4.240.0000.00816.60
7.4.230.0070.00016.63
7.4.220.0170.01116.45
7.4.210.0000.01516.46
7.4.200.0000.00716.39
7.4.190.0000.00816.69
7.4.160.0060.01116.47
7.4.150.0050.01316.68
7.4.140.0140.00517.86
7.4.130.0160.00316.57
7.4.120.0100.00716.51
7.4.110.0080.00816.55
7.4.100.0110.00616.37
7.4.90.0170.00616.52
7.4.80.0130.00319.39
7.4.70.0110.01116.46
7.4.60.0110.00516.46
7.4.50.0000.00416.21
7.4.40.0060.00616.54
7.4.30.0100.00916.61
7.4.00.0060.00614.80
7.3.330.0050.00213.44
7.3.320.0000.00713.21
7.3.310.0040.00416.34
7.3.300.0000.00616.43
7.3.290.0100.00916.42
7.3.280.0090.00616.33
7.3.270.0160.00316.42
7.3.260.0130.01116.35
7.3.240.0100.00716.57
7.3.230.0180.00016.40
7.3.210.0030.01316.45
7.3.200.0120.00916.52
7.3.190.0030.01916.43
7.3.180.0080.00816.46
7.3.170.0130.01016.26
7.3.160.0040.01116.38
7.3.120.0110.00414.96
7.2.330.0100.01316.49
7.2.320.0060.01216.41
7.2.310.0140.00916.57
7.2.300.0090.00916.55
7.2.290.0140.00316.73
7.2.60.0700.01115.13
7.2.00.0000.01119.16
7.1.200.0100.00315.98
7.1.100.0040.01218.04
7.1.70.0030.00517.25
7.1.60.0040.01419.25
7.1.50.0100.01016.99
7.1.00.0100.06022.35
7.0.200.0090.00016.78
7.0.140.0130.06322.10
7.0.120.0100.05722.08
7.0.60.0200.06719.88
7.0.50.0100.03717.87
7.0.40.0030.09020.20
7.0.30.0330.07320.24
7.0.20.0230.08320.30
7.0.10.0230.05720.15
7.0.00.0030.05720.16
5.6.280.0070.07021.04
5.6.210.0100.07720.75
5.6.200.0030.06018.23
5.6.190.0100.04020.34
5.6.180.0230.04320.48
5.6.170.0330.06020.55
5.6.160.0100.08020.54
5.6.150.0100.04318.23
5.6.140.0030.08718.12
5.6.130.0030.06318.16
5.6.120.0000.07320.99
5.6.110.0130.08321.14
5.6.100.0130.06721.11
5.6.90.0130.05721.03
5.6.80.0170.07720.47
5.6.70.4000.04020.39
5.5.350.0130.03320.34
5.5.340.0030.05317.99
5.5.330.0100.04320.56
5.5.320.0200.04320.27
5.5.310.0270.03720.24
5.5.300.0100.07317.97
5.5.290.0030.04317.99
5.5.280.0100.08320.78
5.5.270.0070.04720.86
5.5.260.0070.03720.86
5.5.250.0070.08020.68
5.5.240.0070.05320.15
5.4.450.0270.07019.41
5.4.440.3730.04719.46
5.4.430.0000.06319.21
5.4.420.0030.06319.37
5.4.410.0130.05019.41
5.4.400.0130.06019.09
5.4.390.0070.05719.16
5.4.380.0170.06018.69
5.4.370.0130.04718.51
5.4.360.0030.04318.73
5.4.350.0060.03812.01
5.4.340.0060.03712.01
5.4.320.0100.04412.50
5.4.310.0070.04512.50
5.4.300.0120.04312.50
5.4.290.0120.04612.49
5.4.280.0060.04712.39
5.4.270.0080.04312.39
5.4.260.0070.04412.39
5.4.250.0060.04512.39
5.4.240.0110.07412.39
5.4.230.0040.04412.38
5.4.220.0140.05812.38
5.4.210.0110.05612.38
5.4.200.0080.04312.38
5.4.190.0090.04412.38
5.4.180.0070.05212.38
5.4.170.0110.05012.39
5.4.160.0090.04312.39
5.4.150.0050.04512.38
5.4.140.0050.04612.07
5.4.130.0070.04012.05
5.4.120.0060.04212.01
5.4.110.0060.04012.01
5.4.100.0060.04112.01
5.4.90.0060.04512.01
5.4.80.0070.04212.01
5.4.70.0110.04612.00
5.4.60.0090.04412.01
5.4.50.0090.04012.00
5.4.40.0080.04012.00
5.4.30.0060.04211.99
5.4.20.0050.04411.99
5.4.10.0080.04011.99
5.4.00.0060.04411.48
5.3.290.0070.03812.80
5.3.280.0070.04312.71
5.3.270.0080.04412.72
5.3.260.0070.04612.72
5.3.250.0090.04312.72
5.3.240.0080.04712.72
5.3.230.0060.04512.71
5.3.220.0080.04312.68
5.3.210.0080.04812.68
5.3.200.0070.04112.68
5.3.190.0070.04812.68
5.3.180.0080.04312.67
5.3.170.0080.03912.67
5.3.160.0100.04612.67
5.3.150.0080.04312.67
5.3.140.0090.04512.66
5.3.130.0080.05012.66
5.3.120.0060.04812.66
5.3.110.0070.04812.66
5.3.100.0050.04612.12
5.3.90.0040.04412.10
5.3.80.0080.04312.09
5.3.70.0070.05212.09
5.3.60.0080.04612.08

preferences:
55.55 ms | 401 KiB | 5 Q