3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Foo'; $hex16 = substr( hash( 'sha256', $string ), 0, 16 ); $hexhi = substr( $hex16, 0, 8 ); $hexlo = substr( $hex16, 8, 8 ); $int = hexdec( $hexlo ) | ( hexdec( $hexhi ) << 32 ); var_dump($int);

preferences:
22.76 ms | 407 KiB | 5 Q