3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = mt_rand ( 0, 0xffffff ); // trust the library, love the library... $output = sprintf ( "%06x" , $num ); // muchas smoochas to you, PHP! echo $output;

preferences:
31.75 ms | 402 KiB | 5 Q