3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hash_pbkdf2_reg($a = 'sha256', $password, $salt, $rounds = 5000, $key_length = 32, $raw_output = false) { // Derived key $dk = ''; // Create key for ($block=1; $block<=$key_length; $block++) { // Initial hash for this block $ib = $h = hash_hmac($a, $salt . pack('N', $block), $password, true); // Perform block iterations for ($i=1; $i<$rounds; $i++) { // XOR each iteration $ib ^= ($h = hash_hmac($a, $h, $password, true)); } // Append iterated block $dk .= $ib; } // Return derived key of correct length $key = substr($dk, 0, $key_length); return $raw_output ? $key : base64_encode($key); } $salt = '1234567890123456'; $iterations = 200000; $length = 256; $hash1 = hash_pbkdf2_reg('sha256', 'plnlrtfpijpuhqylxbgqiiyipieyxvfsavzgxbbcfusqkozwpngsyejqlmjsytrmd', $salt, $iterations, $length);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Optional parameter $a declared before required parameter $salt is implicitly treated as a required parameter in /in/uTKa2 on line 2
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:
38.86 ms | 401 KiB | 8 Q