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.0070.05018.86
5.4.250.0130.04318.73
5.4.240.0100.05319.00
5.4.230.0000.05718.80
5.4.220.0170.05018.86
5.4.210.0130.05718.92
5.4.200.0100.05018.71
5.4.190.0100.05018.93
5.4.180.0000.08319.06
5.4.170.0130.05018.96
5.4.160.0070.05318.79
5.4.150.0100.05018.86
5.4.140.0070.05316.36
5.4.130.0030.05316.36
5.4.120.0070.05016.36
5.4.110.0100.04716.33
5.4.100.0070.05316.50
5.4.90.0070.05016.45
5.4.80.0100.04316.45
5.4.70.0030.05316.54
5.4.60.0100.04716.56
5.4.50.0130.04316.25
5.4.40.0030.05316.55
5.4.30.0130.04716.43
5.4.20.0070.05016.46
5.4.10.0170.04016.38
5.4.00.0100.04315.82
5.3.280.0030.05314.67
5.3.270.0200.05314.74
5.3.260.0130.05314.60
5.3.250.0070.05014.62
5.3.240.0070.05314.74
5.3.230.0130.04314.82
5.3.220.0030.05014.57
5.3.210.0070.06014.64
5.3.200.0000.05714.57
5.3.190.0000.06014.40
5.3.180.0100.04714.66
5.3.170.0100.05314.55
5.3.160.0100.04714.74
5.3.150.0070.05014.79
5.3.140.0100.06014.56
5.3.130.0200.06014.73
5.3.120.0100.04714.63
5.3.110.0070.05314.63
5.3.100.0030.05314.22
5.3.90.0170.04014.18
5.3.80.0070.05014.11
5.3.70.0170.04314.01
5.3.60.0170.04014.23
5.3.50.0070.07013.93
5.3.40.0070.07313.97
5.3.30.0070.05013.93
5.3.20.0030.06713.70
5.3.10.0070.06013.71
5.3.00.0130.05013.56
5.2.170.0100.04011.21
5.2.160.0070.04011.09
5.2.150.0070.06311.22
5.2.140.0070.04311.21
5.2.130.0070.04011.05
5.2.120.0130.03011.26
5.2.110.0200.03011.09
5.2.100.0130.05011.26
5.2.90.0100.03711.26
5.2.80.0030.06311.07
5.2.70.0130.03311.16
5.2.60.0030.04010.88
5.2.50.0030.04311.20
5.2.40.0170.03010.97
5.2.30.0170.03010.96
5.2.20.0030.04010.96
5.2.10.0000.04310.95
5.2.00.0030.04310.69
5.1.60.0100.02710.20
5.1.50.0000.04010.04
5.1.40.0070.0479.82
5.1.30.0030.03710.42
5.1.20.0030.03710.45
5.1.10.0070.03310.18
5.1.00.0100.03010.05
5.0.50.0030.0278.65
5.0.40.0030.0278.52
5.0.30.0030.0408.39
5.0.20.0070.0208.25
5.0.10.0030.0278.19
5.0.00.0030.0408.01
4.4.90.0030.0206.80
4.4.80.0000.0236.80
4.4.70.0030.0276.80
4.4.60.0070.0276.80
4.4.50.0070.0236.80
4.4.40.0100.0276.80
4.4.30.0070.0206.80
4.4.20.0000.0236.80
4.4.10.0100.0136.80
4.4.00.0000.0336.80
4.3.110.0070.0176.80
4.3.100.0070.0176.80
4.3.90.0000.0236.80
4.3.80.0030.0306.79
4.3.70.0030.0206.79
4.3.60.0000.0236.79
4.3.50.0030.0206.79
4.3.40.0000.0336.79
4.3.30.0000.0236.80
4.3.20.0030.0206.80
4.3.10.0030.0206.80
4.3.00.0000.0279.28

preferences:
159.1 ms | 939 KiB | 8 Q