3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getRandomString( $length = 8 ) { $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $digits = '0123456789'; $string = ''; for( $i = 0; $i < 5; $i++ ) { $string .= $digits[ mt_rand( 0, strlen( $digits ) - 1 ) ]; } for( $i = 5; $i < $length; $i++ ) { $string .= $characters[ mt_rand( 0, strlen( $characters ) - 1 ) ]; } $array = str_split( $string ); shuffle( $array ); return implode( '', $array ); } for ($i = 0; $i < 10; $i++) { echo getRandomString() . PHP_EOL; }
Output for git.master
ZhX62911 21HPL100 nP96D106 7xz58m76 K363r80Y 6fcR0307 0L1z799i 013L6t1I 2A707aA1 M8348Rc5
Output for git.master_jit
631m70Vm 0H0rD647 54E852fo 62786Fvg cs2589G4 61B6J5W9 83Ye9Q85 9H63r6v1 40gP2d17 29t84E4N

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:
28 ms | 406 KiB | 5 Q