3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(hex2rgb("#AADDFF")); function hex2rgb($hex) { if (substr($hex,0,1)=="#"): $hex=substr($hex, 1); endif; if (strlen($hex)==3): $hex=$hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2]; elseif (strlen($hex)!=6): return false; else: $rgb=array(); $rgb[0] = hexdec(substr($hex,0,2)); // red $rgb[1] = hexdec(substr($hex,2,2)); // green $rgb[2] = hexdec(substr($hex,4,2)); // blue return $rgb; endif; } ?>

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.0110.00718.30
8.3.50.0080.01321.99
8.3.40.0070.01418.75
8.3.30.0180.00018.97
8.3.20.0040.00420.29
8.3.10.0150.00021.91
8.3.00.0040.00422.40
8.2.180.0120.00916.50
8.2.170.0090.00622.96
8.2.160.0060.00920.94
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0090.00626.16
8.2.120.0100.00019.35
8.2.110.0070.00322.26
8.2.100.0040.00819.63
8.2.90.0040.00419.40
8.2.80.0000.00817.97
8.2.70.0000.00917.63
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0000.00818.00
8.2.30.0080.00018.06
8.2.20.0070.00017.60
8.2.10.0000.00819.38
8.2.00.0050.00317.63
8.1.280.0180.00425.92
8.1.270.0070.00722.18
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00423.65
8.1.230.0080.00419.17
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0070.00317.25
8.1.190.0040.00417.65
8.1.180.0050.00218.73
8.1.170.0000.00818.63
8.1.160.0000.00722.08
8.1.150.0030.00518.59
8.1.140.0060.00317.37
8.1.130.0030.00317.79
8.1.120.0030.00317.46
8.1.110.0040.00417.34
8.1.100.0000.00817.32
8.1.90.0000.00717.51
8.1.80.0050.00217.36
8.1.70.0070.00017.47
8.1.60.0000.00817.56
8.1.50.0080.00017.57
8.1.40.0000.00817.47
8.1.30.0050.00317.62
8.1.20.0030.00617.69
8.1.10.0000.00817.46
8.1.00.0040.00417.44
8.0.300.0000.00818.77
8.0.290.0040.00417.05
8.0.280.0030.00318.49
8.0.270.0000.00717.07
8.0.260.0030.00316.71
8.0.250.0070.00016.77
8.0.240.0050.00316.79
8.0.230.0000.00716.84
8.0.220.0040.00416.83
8.0.210.0000.00716.92
8.0.200.0030.00316.86
8.0.190.0000.00816.89
8.0.180.0050.00216.88
8.0.170.0050.00216.84
8.0.160.0050.00316.86
8.0.150.0050.00216.76
8.0.140.0040.00416.78
8.0.130.0000.00513.33
8.0.120.0000.00716.72
8.0.110.0070.00016.75
8.0.100.0000.00716.93
8.0.90.0040.00416.80
8.0.80.0030.01316.78
8.0.70.0040.00416.79
8.0.60.0000.00716.90
8.0.50.0040.00416.85
8.0.30.0090.01016.98
8.0.20.0130.00417.40
8.0.10.0070.00016.97
8.0.00.0100.01016.83
7.4.330.0030.00315.10
7.4.320.0030.00316.62
7.4.300.0060.00016.61
7.4.290.0030.00316.44
7.4.280.0040.00416.59
7.4.270.0030.00316.58
7.4.260.0030.00616.58
7.4.250.0040.00416.58
7.4.240.0020.00616.59
7.4.230.0030.00316.71
7.4.220.0070.01116.53
7.4.210.0030.01316.63
7.4.200.0000.00716.66
7.4.190.0000.00716.74
7.4.160.0070.01016.36
7.4.150.0090.00917.40
7.4.140.0100.01317.86
7.4.130.0090.00916.40
7.4.120.0100.01116.49
7.4.110.0100.00716.32
7.4.100.0120.01116.64
7.4.90.0100.00716.61
7.4.80.0100.00619.39
7.4.70.0100.00716.51
7.4.60.0090.00916.56
7.4.50.0040.00416.42
7.4.40.0100.00622.77
7.4.30.0130.00316.38
7.4.00.0100.00314.60
7.3.330.0060.00013.19
7.3.320.0020.00213.14
7.3.310.0030.00316.19
7.3.300.0000.00616.20
7.3.290.0110.00516.39
7.3.280.0120.00416.26
7.3.270.0120.00617.40
7.3.260.0090.00916.32
7.3.250.0110.00816.63
7.3.240.0070.01016.36
7.3.230.0090.00916.39
7.3.210.0100.01516.23
7.3.200.0060.01119.39
7.3.190.0090.01216.37
7.3.180.0170.00016.34
7.3.170.0090.00816.29
7.3.160.0100.01016.30
7.3.120.0060.00814.75
7.3.10.0070.00716.54
7.3.00.0050.00716.65
7.2.330.0070.01116.57
7.2.320.0150.01016.55
7.2.310.0110.00616.48
7.2.300.0090.01316.57
7.2.290.0160.00016.80
7.2.130.0050.00816.94
7.2.120.0080.00616.77
7.2.110.0060.00616.80
7.2.100.0040.00916.74
7.2.90.0060.00316.86
7.2.80.0090.00516.89
7.2.70.0100.00516.76
7.2.60.0090.00516.78
7.2.50.0070.00816.88
7.2.40.0080.00616.97
7.2.30.0070.01016.86
7.2.20.0030.01116.91
7.2.10.0050.00716.84
7.2.00.0070.00617.56
7.1.250.0040.00615.70
7.1.100.0290.00417.82
7.1.70.0050.00217.25
7.1.60.0060.01919.82
7.1.50.0110.01116.64
7.1.00.0030.08722.53
7.0.200.0030.00716.81
7.0.140.0100.06721.95
7.0.100.0170.07019.94
7.0.90.0030.08319.96
7.0.80.0070.08019.95
7.0.70.0070.07719.93
7.0.60.0170.07019.96
7.0.50.0100.03320.27
7.0.40.0000.04720.04
7.0.30.0100.03720.03
7.0.20.0030.05020.10
7.0.10.0000.04320.07
7.0.00.0070.08020.04
5.6.280.0030.07321.07
5.6.250.0030.09020.63
5.6.240.0070.08720.67
5.6.230.0070.07320.63
5.6.220.0100.06720.56
5.6.210.0070.06720.65
5.6.200.0030.04720.97
5.6.190.0030.05021.04
5.6.180.0100.03721.11
5.6.170.0070.04021.18
5.6.160.0030.04321.02
5.6.150.0100.07321.11
5.6.140.0030.04321.06
5.6.130.0100.03021.08
5.6.120.0070.06021.05
5.6.110.0100.04321.00
5.6.100.0070.04321.03
5.6.90.0000.04721.08
5.6.80.0030.04020.50
5.6.70.0030.04020.41
5.6.60.0030.04020.42
5.6.50.0070.03720.48
5.6.40.0000.05320.49
5.6.30.0070.03320.39
5.6.20.0000.03320.29
5.6.10.0000.07320.38
5.6.00.0030.03720.42
5.5.380.0200.08020.37
5.5.370.0070.09720.35
5.5.360.0030.06320.41
5.5.350.0130.07720.43
5.5.340.0100.04020.91
5.5.330.0000.04720.88
5.5.320.0000.04320.84
5.5.310.0030.04320.84
5.5.300.0100.06720.80
5.5.290.0100.03020.78
5.5.280.0030.04020.78
5.5.270.0030.04720.88
5.5.260.0030.03320.82
5.5.250.0030.04320.73
5.5.240.0030.04320.31
5.5.230.0030.04020.25
5.5.220.0100.04020.18
5.5.210.0000.04320.24
5.5.200.0030.03720.13
5.5.190.0000.04320.28
5.5.180.0030.03720.15
5.5.160.0000.03320.27
5.5.150.0030.04020.20
5.5.140.0000.05020.23
5.5.130.0030.04320.25
5.5.120.0030.03320.21
5.5.110.0130.03720.18
5.5.100.0030.04020.11
5.5.90.0000.04020.11
5.5.80.0000.04320.12
5.5.70.0100.03320.07
5.5.60.0130.07020.15
5.5.50.0130.05719.96
5.5.40.0030.04320.05
5.5.30.0070.04719.93
5.5.20.0170.06720.12
5.5.10.0100.07719.96
5.5.00.0070.07020.06
5.4.450.0000.04319.38
5.4.440.0000.03719.18
5.4.430.0100.03719.50
5.4.420.0030.05019.41
5.4.410.0070.05019.14
5.4.400.0030.03719.13
5.4.390.0000.03719.21
5.4.380.0030.03718.86
5.4.370.0100.02319.14
5.4.360.0030.03719.11
5.4.350.0030.04319.16
5.4.340.0000.04319.05
5.4.320.0030.04019.05
5.4.310.0070.03718.91
5.4.300.0030.04019.14
5.4.290.0000.04719.05
5.4.280.0070.04019.05
5.4.270.0000.04319.03
5.4.260.0030.03719.04
5.4.250.0070.03719.12
5.4.240.0070.03318.89
5.4.230.0000.04019.02
5.4.220.0070.06019.09
5.4.210.0030.04019.25
5.4.200.0070.03319.09
5.4.190.0070.06319.01
5.4.180.0000.08318.94
5.4.170.0100.03719.20
5.4.160.0070.04019.05
5.4.150.0100.06719.03
5.4.140.0130.06716.42
5.4.130.0030.03716.32
5.4.120.0030.08016.46
5.4.110.0070.06716.27
5.4.100.0100.05316.50
5.4.90.0070.05016.50
5.4.80.0100.04716.26
5.4.70.0030.04016.47
5.4.60.0070.06316.40
5.4.50.0170.07316.46
5.4.40.0070.07016.49
5.4.30.0130.06316.36
5.4.20.0030.07716.37
5.4.10.0000.06016.34
5.4.00.0070.06715.85
5.3.290.0030.04014.64
5.3.280.0000.03714.72
5.3.270.0030.08014.66
5.3.260.0070.07714.56
5.3.250.0070.05314.59
5.3.240.0070.05014.54
5.3.230.0070.06014.59
5.3.220.0070.07714.55
5.3.210.0030.07714.66
5.3.200.0100.05714.59
5.3.190.0070.07314.57
5.3.180.0070.04014.49
5.3.170.0070.05314.67
5.3.160.0030.06314.57
5.3.150.0200.06314.51
5.3.140.0130.06314.63
5.3.130.0100.07714.52
5.3.120.0100.07314.66
5.3.110.0030.08014.54
5.3.100.0030.07014.16
5.3.90.0100.05714.09
5.3.80.0100.06014.04
5.3.70.0070.04714.02
5.3.60.0100.06713.93
5.3.50.0030.04313.88
5.3.40.0070.06013.89
5.3.30.0130.06313.89
5.3.20.0130.06013.74
5.3.10.0030.06013.74
5.3.00.0070.06313.62
5.2.170.0070.05711.15
5.2.160.0000.04011.01
5.2.150.0070.04711.27
5.2.140.0000.06711.20
5.2.130.0030.06311.16
5.2.120.0030.05311.16
5.2.110.0000.04011.16
5.2.100.0100.05011.11
5.2.90.0130.05011.16
5.2.80.0070.05711.00
5.2.70.0000.06311.12
5.2.60.0070.04711.19
5.2.50.0000.04310.89
5.2.40.0030.05011.13
5.2.30.0070.06011.04
5.2.20.0070.05710.99
5.2.10.0030.06310.92
5.2.00.0000.03710.73
5.1.60.0030.04710.00
5.1.50.0030.05010.09
5.1.40.0100.0409.78
5.1.30.0000.03710.46
5.1.20.0070.05310.41
5.1.10.0070.05010.07
5.1.00.0070.06710.07
5.0.50.0000.0278.63
5.0.40.0100.0308.43
5.0.30.0030.0578.11
5.0.20.0030.0438.32
5.0.10.0000.0338.27
5.0.00.0100.0508.17
4.4.90.0030.0278.11
4.4.80.0000.0338.11
4.4.70.0000.0138.11
4.4.60.0000.0378.11
4.4.50.0000.0338.11
4.4.40.0000.0438.11
4.4.30.0070.0208.11
4.4.20.0000.0378.11
4.4.10.0000.0378.11
4.4.00.0100.0478.11
4.3.110.0070.0338.11
4.3.100.0030.0338.11
4.3.90.0000.0378.11
4.3.80.0000.0578.11
4.3.70.0070.0308.11
4.3.60.0000.0378.11
4.3.50.0000.0378.11
4.3.40.0070.0478.11
4.3.30.0000.0378.11
4.3.20.0000.0408.11
4.3.10.0000.0338.11
4.3.00.0000.0378.11

preferences:
39.93 ms | 401 KiB | 5 Q