3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hexColor = 'f12'; $color = implode('', array_map(function($color){ return str_repeat($color, 2); }, str_split($hexColor))); echo $color; echo PHP_EOL; print_r( array( 'R' => hexdec($color[0] . $color[1]), 'G' => hexdec($color[2] . $color[3]), 'B' => hexdec($color[4] . $color[5]), ) ); $test = sscanf($color, '%02x%02x%02x', $RGB['R'], $RGB['G'], $RGB['B']); var_dump($test); print_r( $RGB ); echo PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
ff1122 Array ( [R] => 255 [G] => 17 [B] => 34 ) int(3) Array ( [R] => 255 [G] => 17 [B] => 34 )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
58.37 ms | 401 KiB | 8 Q