3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = "#ffffff"; $hex_r = substr($value, 1, 2); $hex_g = substr($value, 3, 2); $hex_b = substr($value, 5, 2); echo intval($hex_r, 16);
Output for 4.3.0 - 7.1.0
255