3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = ''; $hashes = array(); $salts = array('BCRYPT' => '$2a$04$1234567890123456789012', 'SHA256' => '$5$rounds=1000$usesomesillystringforsalt$','SHA512' => '$6$rounds=1000$usesomesillystringforsalt$', 'MD5' => '$1$rasmusle$'); foreach ($salts as $algo => $salt) { do { $str .= '0'; $hashes[] = crypt($str, $salt); if (count(array_unique($hashes)) === count($hashes)) $allUnique = true; else $allUnique = false; if (strlen($str) > 500) { echo "Could not detect trunction after 500 characters for $algo...giving up...\n\n"; break; } } while($allUnique); echo "Stopped at " . strlen($str) . " characters for salt $algo before truncation was detected...\n\n"; $lst = array_pop($hashes); $stl = array_pop($hashes); echo "$stl\n$lst"; }
Output for git.master_jit, git.master, rfc.property-hooks
Stopped at 73 characters for salt BCRYPT before truncation was detected... $2a$04$123456789012345678901ucLrgvM.TkrxjZYl6pfDktLTbZfVhAXy $2a$04$123456789012345678901ucLrgvM.TkrxjZYl6pfDktLTbZfVhAXy
Process exited with code 137.

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:
37.89 ms | 401 KiB | 8 Q