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' => 'boeschrikboeschrikboe', 'cost' => 12]), password_hash($b, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe', '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/HWgaF on line 9 Warning: password_hash(): Provided salt is too short: 21 expecting 22 in /in/HWgaF on line 9 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/HWgaF on line 10 Warning: password_hash(): Provided salt is too short: 21 expecting 22 in /in/HWgaF on line 10 int(4) int(9) NULL NULL
Output for 5.5.0 - 5.6.28
Warning: password_hash(): Provided salt is too short: 21 expecting 22 in /in/HWgaF on line 9 Warning: password_hash(): Provided salt is too short: 21 expecting 22 in /in/HWgaF 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/HWgaF on line 9
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/HWgaF on line 9
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
Parse error: parse error, unexpected '[' in /in/HWgaF on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/HWgaF on line 9
Process exited with code 255.