1--TEST--
2Test error operation of password_hash() with argon2
3--SKIPIF--
4<?php
5if (!defined('PASSWORD_ARGON2I')) die('skip password_hash not built with Argon2');
6?>
7--FILE--
8<?php
9var_dump(password_hash('test', PASSWORD_ARGON2I, ['memory_cost' => 0]));
10var_dump(password_hash('test', PASSWORD_ARGON2I, ['time_cost' => 0]));
11var_dump(password_hash('test', PASSWORD_ARGON2I, ['threads' => 0]));
12?>
13--EXPECTF--
14Warning: password_hash(): Memory cost is outside of allowed memory range in %s on line %d
15NULL
16
17Warning: password_hash(): Time cost is outside of allowed time range in %s on line %d
18NULL
19
20Warning: password_hash(): Invalid number of threads in %s on line %d
21NULL
22