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); if (strlen($hex)==3) $hex=$hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2]; elseif (strlen($hex)!=6) return false; $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; } ?>

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.0070.01418.27
8.3.50.0090.00522.07
8.3.40.0140.00018.84
8.3.30.0190.00319.01
8.3.20.0000.00720.38
8.3.10.0040.00422.01
8.3.00.0040.00422.58
8.2.180.0090.00616.46
8.2.170.0110.00422.96
8.2.160.0070.00720.93
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00817.63
8.2.110.0070.00319.29
8.2.100.0070.00417.72
8.2.90.0080.00017.84
8.2.80.0040.00417.63
8.2.70.0050.00317.50
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0040.00418.09
8.2.30.0040.00418.06
8.2.20.0000.00817.71
8.2.10.0050.00217.68
8.2.00.0030.00617.57
8.1.280.0120.00925.92
8.1.270.0200.00021.96
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0100.00022.08
8.1.230.0090.00320.89
8.1.220.0090.00017.74
8.1.210.0040.00418.85
8.1.200.0080.00017.35
8.1.190.0060.00317.23
8.1.180.0030.00619.44
8.1.170.0040.00418.40
8.1.160.0030.00518.85
8.1.150.0000.00720.09
8.1.140.0100.00017.46
8.1.130.0030.00317.71
8.1.120.0070.00017.46
8.1.110.0000.00817.46
8.1.100.0040.00417.34
8.1.90.0030.00317.36
8.1.80.0040.00417.51
8.1.70.0040.00417.48
8.1.60.0040.00417.62
8.1.50.0000.00817.49
8.1.40.0000.00917.54
8.1.30.0080.00017.59
8.1.20.0040.00417.51
8.1.10.0060.00317.48
8.1.00.0040.00417.50
8.0.300.0000.00819.95
8.0.290.0040.00416.63
8.0.280.0040.00218.39
8.0.270.0050.00317.16
8.0.260.0070.00016.68
8.0.250.0000.00716.90
8.0.240.0020.00516.94
8.0.230.0030.00316.90
8.0.220.0000.00716.77
8.0.210.0030.00416.86
8.0.200.0040.00416.83
8.0.190.0000.00816.94
8.0.180.0040.00416.90
8.0.170.0040.00416.87
8.0.160.0060.00316.89
8.0.150.0070.00016.75
8.0.140.0080.00016.77
8.0.130.0030.00313.31
8.0.120.0000.00816.84
8.0.110.0000.00816.93
8.0.100.0000.00716.92
8.0.90.0000.00716.83
8.0.80.0000.01616.93
8.0.70.0000.00816.89
8.0.60.0070.00016.92
8.0.50.0040.00416.85
8.0.30.0120.01117.16
8.0.20.0160.00517.40
8.0.10.0080.00016.84
8.0.00.0100.01016.75
7.4.330.0030.00315.02
7.4.320.0030.00316.65
7.4.300.0040.00416.41
7.4.290.0000.00716.44
7.4.280.0000.00816.59
7.4.270.0040.00416.41
7.4.260.0030.00616.64
7.4.250.0030.00516.56
7.4.240.0020.00616.54
7.4.230.0030.00316.37
7.4.220.0160.01016.57
7.4.210.0100.00616.59
7.4.200.0070.00016.54
7.4.190.0030.00316.59
7.4.160.0070.00716.43
7.4.150.0180.00617.40
7.4.140.0110.01317.86
7.4.130.0110.00716.67
7.4.120.0110.00616.58
7.4.110.0070.01016.51
7.4.100.0070.01116.65
7.4.90.0000.01816.59
7.4.80.0140.00519.39
7.4.70.0120.00616.55
7.4.60.0030.01316.57
7.4.50.0000.00816.32
7.4.40.0030.01422.77
7.4.30.0030.01416.73
7.4.00.0060.00714.75
7.3.330.0000.00513.15
7.3.320.0040.00413.26
7.3.310.0000.00816.35
7.3.300.0060.00016.37
7.3.290.0090.00616.26
7.3.280.0050.01216.29
7.3.270.0080.00817.40
7.3.260.0040.01716.58
7.3.250.0080.01216.54
7.3.240.0040.01316.38
7.3.230.0110.00616.50
7.3.210.0070.01116.59
7.3.200.0070.01119.39
7.3.190.0110.00716.55
7.3.180.0060.00916.48
7.3.170.0100.00716.32
7.3.160.0110.00616.59
7.3.120.0100.00014.73
7.3.10.0050.00516.64
7.3.00.0070.00316.71
7.2.330.0030.01416.56
7.2.320.0070.01116.73
7.2.310.0100.00716.72
7.2.300.0090.00916.55
7.2.290.0090.00816.43
7.2.130.0070.00416.91
7.2.120.0040.00716.82
7.2.110.0110.00016.76
7.2.100.0000.01116.79
7.2.90.0000.01116.91
7.2.80.0020.00716.91
7.2.70.0040.00716.64
7.2.60.0070.00316.87
7.2.50.0070.00416.92
7.2.40.0040.00716.51
7.2.30.0070.00316.79
7.2.20.0050.00516.93
7.2.10.0080.00416.86
7.2.00.0050.00618.10
7.1.250.0030.00715.80
7.1.100.0310.00417.36
7.1.70.0080.00317.19
7.1.60.0000.01619.82
7.1.50.0140.01016.96
7.1.00.0000.08022.45
7.0.200.0070.00316.60
7.0.140.0100.06322.18
7.0.60.0270.06020.01
7.0.50.0100.07317.84
7.0.40.0070.04020.40
7.0.30.0230.03720.08
7.0.20.0200.08720.24
7.0.10.0130.06320.25
7.0.00.0030.05720.25
5.6.280.0070.07021.11
5.6.210.0030.08720.69
5.6.200.0100.08018.22
5.6.190.0070.05720.57
5.6.180.0270.08020.48
5.6.170.0100.05020.57
5.6.160.0170.06020.54
5.6.150.0030.04318.23
5.6.140.0100.08318.28
5.6.130.0100.08018.14
5.6.120.0030.04320.99
5.6.110.0070.04021.14
5.6.100.0030.04021.12
5.6.90.0100.08021.08
5.6.80.0070.05020.28
5.5.350.0200.03720.33
5.5.340.0030.04718.08
5.5.330.0070.05020.21
5.5.320.0200.07720.24
5.5.310.0300.03320.27
5.5.300.0030.06718.07
5.5.290.0070.07718.04
5.5.280.0030.09320.77
5.5.270.0170.07320.73
5.5.260.0200.06720.86
5.5.250.0070.08020.70
5.5.240.0200.03020.34
5.4.450.0830.05319.48
5.4.440.0300.06319.38
5.4.430.0830.05719.54
5.4.420.0970.05319.57
5.4.410.0900.06319.25
5.4.400.0100.05319.12
5.4.390.0800.05319.15
5.4.380.0470.05018.69
5.4.370.0230.05318.76
5.4.360.0400.04318.84
5.4.350.0330.05318.73
5.4.340.0200.06018.80
5.4.320.0130.03712.51
5.4.310.0060.04012.50
5.4.300.0060.03512.50
5.4.290.0070.04412.50
5.4.280.0080.04012.39
5.4.270.0080.04012.40
5.4.260.0100.05018.87
5.4.250.0100.06318.82
5.4.240.0070.05018.90
5.4.230.0070.05319.00
5.4.220.0030.07019.06
5.4.210.0100.05319.00
5.4.200.0130.07018.92
5.4.190.0170.07318.82
5.4.180.0300.05718.97
5.4.170.0130.05318.96
5.4.160.0170.04018.95
5.4.150.0030.05719.05
5.4.140.0070.05016.36
5.4.130.0030.05016.56
5.4.120.0070.05016.39
5.4.110.0030.07716.35
5.4.100.0070.05016.46
5.4.90.0000.05316.44
5.4.80.0100.05016.60
5.4.70.0130.04316.23
5.4.60.0070.05016.40
5.4.50.0000.05316.38
5.4.40.0170.04016.43
5.4.30.0130.06016.36
5.4.20.0100.04316.46
5.4.10.0100.04716.34
5.4.00.0100.05015.73
5.3.290.0090.03612.80
5.3.280.0170.06714.68
5.3.270.0100.07714.69
5.3.260.0130.05014.77
5.3.250.0070.05014.62
5.3.240.0000.05714.78
5.3.230.0030.05314.76
5.3.220.0100.05014.55
5.3.210.0130.06014.55
5.3.200.0000.05714.74
5.3.190.0030.05314.73
5.3.180.0100.04714.46
5.3.170.0030.05314.64
5.3.160.0100.04314.78
5.3.150.0100.04714.73
5.3.140.0100.04714.62
5.3.130.0030.05714.52
5.3.120.0130.06714.54
5.3.110.0070.05314.68
5.3.100.0070.05313.94
5.3.90.0130.07014.09
5.3.80.0100.04714.10
5.3.70.0070.05014.03
5.3.60.0070.04713.90
5.3.50.0070.05314.11
5.3.40.0070.05014.02
5.3.30.0170.06313.97
5.3.20.0070.05013.66
5.3.10.0100.05713.71
5.3.00.0100.04713.72
5.2.170.0100.05311.22
5.2.160.0100.04311.04
5.2.150.0030.04711.36
5.2.140.0070.04311.13
5.2.130.0100.03311.19
5.2.120.0070.03711.26
5.2.110.0070.04711.19
5.2.100.0070.05711.00
5.2.90.0100.03711.00
5.2.80.0030.04311.30
5.2.70.0130.04711.04
5.2.60.0170.02711.28
5.2.50.0030.04310.88
5.2.40.0100.04310.97
5.2.30.0030.04310.93
5.2.20.0170.03310.94
5.2.10.0030.04010.86
5.2.00.0130.05010.79
5.1.60.0070.0439.92
5.1.50.0070.0309.98
5.1.40.0130.03710.21
5.1.30.0030.03710.33
5.1.20.0030.04010.26
5.1.10.0070.03310.14
5.1.00.0030.0379.91
5.0.50.0100.0238.79
5.0.40.0100.0338.63
5.0.30.0030.0408.38
5.0.20.0030.0338.21
5.0.10.0070.0238.42
5.0.00.0070.0408.23
4.4.90.0030.0206.86
4.4.80.0100.0206.86
4.4.70.0000.0336.86
4.4.60.0000.0276.86
4.4.50.0030.0276.86
4.4.40.0000.0376.86
4.4.30.0030.0206.86
4.4.20.0000.0236.86
4.4.10.0100.0136.86
4.4.00.0000.0336.86
4.3.110.0170.0176.86
4.3.100.0030.0306.86
4.3.90.0000.0236.86
4.3.80.0030.0306.86
4.3.70.0070.0176.86
4.3.60.0030.0306.86
4.3.50.0030.0306.86
4.3.40.0030.0336.86
4.3.30.0000.0236.86
4.3.20.0000.0236.86
4.3.10.0070.0176.86
4.3.00.0130.0208.12

preferences:
47.29 ms | 401 KiB | 5 Q