3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getConstantName($category, $constantNumber) { foreach (get_defined_constants() as $key => $value) { if (strlen($key) > strlen($category)) { if (substr($key, 0, strlen($category)) === $category) { if ($value === $constantNumber) { return $key; } return "No constant found."; } } } } getConstantName('IMAGE', 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.0040.01216.75
8.3.50.0090.01322.01
8.3.40.0120.00918.98
8.3.30.0100.00319.22
8.3.20.0040.00420.32
8.3.10.0050.00322.02
8.3.00.0040.00419.27
8.2.180.0090.00916.88
8.2.170.0080.00818.81
8.2.160.0140.00022.96
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0080.00019.66
8.2.110.0060.00320.66
8.2.100.0040.00718.09
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0040.00417.74
8.2.60.0030.00617.93
8.2.50.0100.00018.07
8.2.40.0090.00018.31
8.2.30.0000.00719.70
8.2.20.0080.00017.82
8.2.10.0040.00418.19
8.2.00.0000.00717.72
8.1.280.0130.00725.92
8.1.270.0070.00318.91
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0090.00023.91
8.1.230.0100.00019.25
8.1.220.0050.00317.91
8.1.210.0030.00518.77
8.1.200.0030.00617.47
8.1.190.0080.00017.47
8.1.180.0040.00418.10
8.1.170.0040.00418.82
8.1.160.0030.00522.13
8.1.150.0000.00718.89
8.1.140.0040.00417.53
8.1.130.0000.00717.86
8.1.120.0000.00717.59
8.1.110.0080.00017.57
8.1.100.0050.00317.57
8.1.90.0000.00817.58
8.1.80.0070.00017.46
8.1.70.0000.00717.63
8.1.60.0040.00417.69
8.1.50.0030.00517.55
8.1.40.0050.00317.54
8.1.30.0030.00517.77
8.1.20.0040.00417.61
8.1.10.0030.00517.52
8.1.00.0030.00617.56
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0040.00418.58
8.0.270.0030.00317.39
8.0.260.0030.00317.38
8.0.250.0040.00417.00
8.0.240.0080.00017.07
8.0.230.0000.00817.03
8.0.220.0070.00016.99
8.0.210.0030.00317.07
8.0.200.0030.00316.96
8.0.190.0040.00417.03
8.0.180.0040.00416.94
8.0.170.0030.00517.01
8.0.160.0070.00017.09
8.0.150.0040.00416.83
8.0.140.0040.00417.06
8.0.130.0050.00013.43
8.0.120.0030.00616.86
8.0.110.0070.00017.03
8.0.100.0050.00216.82
8.0.90.0050.00217.11
8.0.80.0040.01217.01
8.0.70.0040.00416.81
8.0.60.0000.00717.05
8.0.50.0040.00416.88
8.0.30.0080.01117.22
8.0.20.0100.00717.40
8.0.10.0030.00617.07
8.0.00.0090.00816.89
7.4.330.0000.00515.09
7.4.320.0000.00616.52
7.4.300.0070.00016.62
7.4.290.0040.00416.61
7.4.280.0040.00416.71
7.4.270.0000.00716.63
7.4.260.0020.00516.70
7.4.250.0030.00516.56
7.4.240.0030.00516.68
7.4.230.0030.00316.73
7.4.220.0090.01816.59
7.4.210.0090.00916.74
7.4.200.0040.00416.43
7.4.160.0100.00616.40
7.4.150.0110.00717.40
7.4.140.0050.01117.86
7.4.130.0100.00716.54
7.4.120.0110.00616.66
7.4.110.0110.01316.77
7.4.100.0070.01116.62
7.4.90.0090.00916.72
7.4.80.0100.00719.39
7.4.70.0080.00816.56
7.4.60.0070.01016.57
7.4.50.0000.00416.56
7.4.40.0120.00616.79
7.4.30.0070.01516.77
7.4.00.0070.00715.11
7.3.330.0000.00513.32
7.3.320.0000.00513.38
7.3.310.0000.00716.37
7.3.300.0070.00016.43
7.3.290.0070.00016.42
7.3.280.0050.01316.43
7.3.270.0150.00317.40
7.3.260.0120.00816.72
7.3.250.0120.00716.50
7.3.240.0030.01316.33
7.3.230.0110.00716.41
7.3.210.0100.00616.61
7.3.200.0130.00319.39
7.3.190.0060.01016.70
7.3.180.0130.00716.51
7.3.170.0030.01516.42
7.3.160.0080.00816.63
7.3.10.0030.01016.66
7.3.00.0060.01016.78
7.2.330.0060.01216.81
7.2.320.0060.01316.82
7.2.310.0060.01216.77
7.2.300.0070.01016.93
7.2.290.0090.00916.82
7.2.130.0080.00816.61
7.2.120.0080.00817.05
7.2.110.0070.00716.94
7.2.100.0100.00716.92
7.2.90.0090.00916.88
7.2.80.0070.00716.82
7.2.70.0040.01117.02
7.2.60.0090.00517.00
7.2.50.0090.00617.04
7.2.40.0000.01217.04
7.2.30.0000.01516.92
7.2.20.0110.00416.75
7.2.10.0000.01016.95
7.2.00.0060.00618.13
7.1.250.0050.00515.59
7.1.200.0060.00315.99
7.1.100.0040.00718.25
7.1.70.0050.00217.29
7.1.60.0090.01219.46
7.1.50.0130.01017.04
7.1.00.0030.07722.51
7.0.200.0030.01416.69
7.0.140.0030.06022.05
7.0.60.0100.04720.02
7.0.50.0070.07317.96
7.0.40.0030.04720.21
7.0.30.0200.07720.13
7.0.20.0300.04720.16
7.0.10.0100.03720.25
7.0.00.0030.04020.06
5.6.280.0100.07021.19
5.6.210.0030.08720.50
5.6.200.0130.08018.18
5.6.190.0030.04720.52
5.6.180.0430.05720.41
5.6.170.0230.08320.56
5.6.160.0200.05020.37
5.6.150.0070.07018.19
5.6.140.0030.05318.17
5.6.130.0130.07318.25
5.6.120.0100.05321.02
5.6.110.0000.04721.15
5.6.100.0100.08721.05
5.6.90.0070.05321.01
5.6.80.0030.04020.43
5.5.350.0330.07320.37
5.5.340.0070.03718.09
5.5.330.0030.07720.57
5.5.320.0070.07720.38
5.5.310.0170.07320.21
5.5.300.0100.08317.95
5.5.290.0070.08018.08
5.5.280.0000.04720.88
5.5.270.0030.06020.88
5.5.260.0070.08320.90
5.5.250.0030.04320.61
5.5.240.0030.07020.26
5.4.450.0500.05319.34
5.4.440.0230.07319.14
5.4.430.0200.06719.60
5.4.420.0770.08319.46
5.4.410.0770.04319.35
5.4.400.0570.05319.06
5.4.390.0930.05718.70
5.4.380.1070.04718.76
5.4.370.0930.05718.89
5.4.360.0900.04718.93
5.4.350.1130.08318.96
5.4.340.1000.06018.95
5.4.320.1070.05318.82
5.4.310.0930.06718.84
5.4.300.1230.03018.95
5.4.290.1030.06318.75
5.4.280.1030.06018.69
5.4.270.0970.05018.72
5.4.260.1000.05318.68
5.4.250.0770.05718.89
5.4.240.0970.05318.94
5.4.230.1030.05018.85
5.4.220.1030.05718.88
5.4.210.0970.04718.72
5.4.200.0970.05016.95
5.4.190.0970.05018.93
5.4.180.1070.04718.92
5.4.170.1000.06018.73
5.4.160.1000.05018.92
5.4.150.0900.06318.71
5.4.140.1030.04716.40
5.4.130.1000.05016.36
5.4.120.0970.05316.39
5.4.110.1030.05316.42
5.4.100.1130.05316.61
5.4.90.1070.07316.46
5.4.80.1000.05716.42
5.4.70.1030.05016.56
5.4.60.0970.04316.45
5.4.50.0970.05016.40
5.4.40.1100.06016.40
5.4.30.1000.05316.42
5.4.20.0930.05316.35
5.4.10.0900.05716.46
5.4.00.0900.05315.84
5.3.290.1030.05014.94
5.3.280.1000.05014.77
5.3.270.0670.06714.88
5.3.260.1130.04714.80
5.3.250.1070.05314.99
5.3.240.1070.06314.81
5.3.230.1000.05714.94
5.3.220.1470.06314.84
5.3.210.1200.07314.92
5.3.200.1100.07314.85
5.3.190.1000.05014.85
5.3.180.1000.05714.77
5.3.170.0930.05014.73
5.3.160.1000.05314.96
5.3.150.1000.05314.88
5.3.140.0970.05314.79
5.3.130.1170.04314.94
5.3.120.1130.04714.75
5.3.110.0870.07014.89
5.3.100.1030.04314.23
5.3.90.0930.05314.41
5.3.80.1070.04714.34
5.3.70.0970.06014.26
5.3.60.0900.06314.20
5.3.50.0970.05014.18
5.3.40.0970.05014.25
5.3.30.1000.05014.29
5.3.20.1130.03314.03
5.3.10.0930.07013.88
5.3.00.1070.06313.93
5.2.170.0870.05011.34
5.2.160.0870.04311.36
5.2.150.1070.04711.29
5.2.140.0800.06011.40
5.2.130.0830.05011.27
5.2.120.0830.05011.34
5.2.110.0870.04311.27
5.2.100.1000.05711.45
5.2.90.0900.04011.47
5.2.80.0830.05711.31
5.2.70.0970.03011.46
5.2.60.0870.04011.17
5.2.50.0900.03311.19
5.2.40.0730.03711.20
5.2.30.0630.04311.24
5.2.20.0700.03311.20
5.2.10.0630.04311.03
5.2.00.0670.04310.88
5.1.60.0600.04010.20
5.1.50.0630.03310.18
5.1.40.0630.03710.17
5.1.30.0630.04010.56
5.1.20.0630.05010.53
5.1.10.0630.04010.21
5.1.00.0430.04310.27
5.0.50.0270.0338.74
5.0.40.0330.0338.60
5.0.30.0470.0478.46
5.0.20.0330.0308.47
5.0.10.0330.0308.35
5.0.00.0330.0478.30
4.4.90.0400.0206.03
4.4.80.0370.0235.99
4.4.70.0330.0235.98
4.4.60.0330.0236.00
4.4.50.0370.0236.05
4.4.40.0370.0376.11
4.4.30.0400.0236.02
4.4.20.0330.0276.13
4.4.10.0300.0336.14
4.4.00.0370.0436.10
4.3.110.0270.0235.95
4.3.100.0330.0235.96
4.3.90.0300.0275.91
4.3.80.0330.0405.92
4.3.70.0300.0235.88
4.3.60.0370.0105.91
4.3.50.0330.0205.94
4.3.40.0300.0405.91
4.3.30.0200.0205.26
4.3.20.0300.0135.26
4.3.10.0200.0205.26
4.3.00.0130.0179.23

preferences:
38.51 ms | 401 KiB | 5 Q