3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateSignature($signatureHash) { $signatureHash = $signatureHash; //generating signature $minVal = (int) -2147483648; $maxVal = (int) 2147483647; $hash = (int) 0; for ($i = 0; $i < strlen($signatureHash); $i++) { $hash = ((int) $hash * 31) + ((int) ord(substr($signatureHash, $i, 1))); if ($hash > $maxVal) { $hash = (int) $hash + (int) $minVal - (int) $maxVal - 1; } else if ($hash < $minVal) { $hash = (int) $hash + (int) $maxVal - (int) $minVal + 1; } } return (int) $hash; } $hash1 = '05MAIN0044JT00001742IDR30534D34314E303034414B3359503459'; $hash2 = '18044515'; echo $signature = generateSignature($hash1) + generateSignature($hash2);
Output for git.master, git.master_jit, rfc.property-hooks
-6967498545339047600

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