1--TEST-- 2Test normal operation of password_get_info() with Argon2i and Argon2id 3--SKIPIF-- 4<?php 5if (!defined('PASSWORD_ARGON2I')) die('skip password_get_info not built with Argon2'); 6if (!defined('PASSWORD_ARGON2ID')) die('skip password_get_info not built with Argon2'); 7?> 8--FILE-- 9<?php 10 11var_dump(password_get_info('$argon2i$v=19$m=65536,t=3,p=1$SWhIcG5MT21Pc01PbWdVZw$WagZELICsz7jlqOR2YzoEVTWb2oOX1tYdnhZYXxptbU')); 12var_dump(password_get_info('$argon2id$v=19$m=1024,t=2,p=2$Zng1U1RHS0h1aUJjbGhPdA$ajQnG5s01Ws1ad8xv+1qGfXF8mYxxWdyul5rBpomuZQ')); 13echo "OK!"; 14?> 15--EXPECT-- 16array(3) { 17 ["algo"]=> 18 int(2) 19 ["algoName"]=> 20 string(7) "argon2i" 21 ["options"]=> 22 array(3) { 23 ["memory_cost"]=> 24 int(65536) 25 ["time_cost"]=> 26 int(3) 27 ["threads"]=> 28 int(1) 29 } 30} 31array(3) { 32 ["algo"]=> 33 int(3) 34 ["algoName"]=> 35 string(8) "argon2id" 36 ["options"]=> 37 array(3) { 38 ["memory_cost"]=> 39 int(1024) 40 ["time_cost"]=> 41 int(2) 42 ["threads"]=> 43 int(2) 44 } 45} 46OK! 47