3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $number = 1234567890; $hex = strtoupper(dechex($number)); $hex_padded = str_pad($hex, 9*2, "0", STR_PAD_LEFT); preg_match_all('/.{2}/', $hex_padded, $matches); $result = array_reverse($matches[0]); var_dump($result);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(9) { [0]=> string(2) "D2" [1]=> string(2) "02" [2]=> string(2) "96" [3]=> string(2) "49" [4]=> string(2) "00" [5]=> string(2) "00" [6]=> string(2) "00" [7]=> string(2) "00" [8]=> string(2) "00" }