3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( password_hash('foo', -1) );
Output for 8.0.0 - 8.0.22, 8.1.0 - 8.1.9
Fatal error: Uncaught ValueError: password_hash(): Argument #2 ($algo) must be a valid password hashing algorithm in /in/siaNi:4 Stack trace: #0 /in/siaNi(4): password_hash('foo', -1) #1 {main} thrown in /in/siaNi on line 4
Process exited with code 255.
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.30
Warning: password_hash(): Unknown password hashing algorithm: -1 in /in/siaNi on line 4 NULL

preferences:
193.74 ms | 403 KiB | 245 Q