3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo hex2rgb("CCDDFF") 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)
5.4.260.0090.03912.36
5.4.250.0090.04212.36
5.4.240.0100.04012.36
5.4.230.0070.04312.35
5.4.220.0070.04212.35
5.4.210.0080.04112.35
5.4.200.0080.04312.35
5.4.190.0080.04212.35
5.4.180.0070.03812.35
5.4.170.0060.03612.36
5.4.160.0060.03512.35
5.4.150.0060.03612.34
5.4.140.0040.03912.04
5.4.130.0070.03612.02
5.4.120.0070.03511.98
5.4.110.0070.03911.98
5.4.100.0040.03911.98
5.4.90.0050.03811.98
5.4.80.0040.03811.98
5.4.70.0040.04111.98
5.4.60.0070.03811.97
5.4.50.0060.03411.97
5.4.40.0080.03211.97
5.4.30.0050.03811.96
5.4.20.0080.03611.96
5.4.10.0060.04311.96
5.4.00.0060.03811.45
5.3.280.0070.03612.71
5.3.270.0070.03812.72
5.3.260.0060.03912.72
5.3.250.0070.04012.72
5.3.240.0070.03712.72
5.3.230.0090.03612.71
5.3.220.0120.03912.68
5.3.210.0070.03812.68
5.3.200.0080.04012.68
5.3.190.0080.03812.68
5.3.180.0070.03512.67
5.3.170.0040.03812.67
5.3.160.0060.03612.68
5.3.150.0070.03612.67
5.3.140.0050.03812.66
5.3.130.0060.04212.66
5.3.120.0070.03812.66
5.3.110.0050.03812.65
5.3.100.0070.03512.12
5.3.90.0070.03412.08
5.3.80.0070.04312.08
5.3.70.0090.03412.08
5.3.60.0050.03712.07
5.3.50.0070.03612.00
5.3.40.0040.03812.00
5.3.30.0060.04011.94
5.3.20.0060.04311.69
5.3.10.0080.04211.65
5.3.00.0070.03811.64
5.2.170.0040.0319.14
5.2.160.0070.0329.14
5.2.150.0080.0349.14
5.2.140.0060.0339.14
5.2.130.0040.0369.10
5.2.120.0070.0259.10
5.2.110.0050.0299.11
5.2.100.0040.0299.10
5.2.90.0050.0299.10
5.2.80.0040.0359.09
5.2.70.0040.0319.09
5.2.60.0040.0329.05
5.2.50.0050.0349.02
5.2.40.0040.0308.99
5.2.30.0050.0308.97
5.2.20.0040.0298.96
5.2.10.0050.0278.88
5.2.00.0070.0308.74
5.1.60.0030.0258.03
5.1.50.0040.0278.03
5.1.40.0050.0238.01
5.1.30.0080.0298.36
5.1.20.0060.0308.38
5.1.10.0050.0308.11
5.1.00.0050.0298.11
5.0.50.0040.0236.58
5.0.40.0040.0216.44
5.0.30.0040.0316.26
5.0.20.0030.0196.23
5.0.10.0030.0206.20
5.0.00.0040.0346.20
4.4.90.0010.0174.78
4.4.80.0030.0154.75
4.4.70.0040.0164.76
4.4.60.0040.0174.75
4.4.50.0030.0154.77
4.4.40.0040.0234.71
4.4.30.0030.0154.76
4.4.20.0020.0164.84
4.4.10.0020.0164.85
4.4.00.0030.0254.76
4.3.110.0030.0164.67
4.3.100.0030.0164.66
4.3.90.0020.0154.63
4.3.80.0020.0254.58
4.3.70.0040.0154.63
4.3.60.0050.0164.63
4.3.50.0040.0194.63
4.3.40.0040.0234.54
4.3.30.0020.0153.27
4.3.20.0020.0163.25
4.3.10.0020.0163.21
4.3.00.0100.0237.31

preferences:
140.19 ms | 1394 KiB | 7 Q