3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "meow"; $b = $a . "\0woef"; var_dump( strlen($a), strlen($b), password_hash($a, PASSWORD_BCRYPT, ['salt' => 'boeschrik', 'cost' => 12]), password_hash($b, PASSWORD_BCRYPT, ['salt' => 'boeschrik', 'cost' => 12]) );
Output for 7.0.0 - 7.1.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/LlR9N on line 9 Warning: password_hash(): Provided salt is too short: 9 expecting 22 in /in/LlR9N on line 9 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/LlR9N on line 10 Warning: password_hash(): Provided salt is too short: 9 expecting 22 in /in/LlR9N on line 10 int(4) int(9) NULL NULL
Output for hhvm-3.10.0 - 3.12.0
Warning: password_hash(): Provided salt is too short: 9 expecting 22 in /in/LlR9N on line 11 Warning: password_hash(): Provided salt is too short: 9 expecting 22 in /in/LlR9N on line 11 int(4) int(9) NULL NULL
Output for 5.5.0 - 5.6.21
Warning: password_hash(): Provided salt is too short: 9 expecting 22 in /in/LlR9N on line 9 Warning: password_hash(): Provided salt is too short: 9 expecting 22 in /in/LlR9N on line 10 int(4) int(9) NULL NULL
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/LlR9N on line 9
Process exited with code 255.
Output for 5.2.3 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/LlR9N on line 9
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected '[' in <b>/in/LlR9N</b> on line <b>9</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
<br /> <b>Parse error</b>: parse error, unexpected '[' in <b>/in/LlR9N</b> on line <b>9</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/LlR9N</b> on line <b>9</b><br />
Process exited with code 255.