3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * crypt-test-salt-nul-bytes.php */ $saltLen = 16; $prefix = '$5$'; $length = 63; $plain = 'hello'; $salt = str_repeat("\0", $saltLen); $salt[15] = '.'; $salt[0] = '.'; $salt = ""; $result = crypt($plain, $prefix . $salt); var_dump($result); echo strlen($result) !== $length ? 'FAIL' : 'OK';
Output for git.master, git.master_jit, rfc.property-hooks
string(47) "$5$$TCRu/ts4Npu8OJyeWy2WnUHCe/6bKVMSi0sROUrPh48" FAIL

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