1--TEST--
2Test normal operation of password_hash()
3--SKIPIF--
4<?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); ?>
5--FILE--
6<?php
7//-=-=-=-
8
9var_dump(password_hash("foo", PASSWORD_BCRYPT));
10
11$algos = [
12  PASSWORD_BCRYPT,
13  '2y',
14  1,
15];
16
17foreach ($algos as $algo) {
18  $hash = password_hash("foo", $algo);
19  var_dump($hash === crypt("foo", $hash));
20}
21
22echo "OK!";
23?>
24--EXPECTF--
25string(60) "$2y$12$%s"
26bool(true)
27bool(true)
28bool(true)
29OK!
30