version_test.php:
"Hay un error de sintaxis en la línea 5. Es posible que las sugerencias para el código no funcionen hasta que resuelva este error".
Código PHP:
Ver original
<?php require "lib/password.php"; echo "Test for functionality of compat library: " . (PasswordCompat\binary\check() ? "Pass" : "Fail"); echo "\n"; ?>
password.php:
"Hay un error de sintaxis en la línea 10. Es posible que las sugerencias para el código no funcionen hasta que resuelva este error".
Código PHP:
Ver original
<?php /** * A Compatibility library with PHP 5.5's simplified password hashing API. * * @author Anthony Ferrara <[email protected]> * @license http://www.opensource.org/licenses/mit-license.html MIT License * @copyright 2012 The Authors */ namespace { /** * PHPUnit Process isolation caches constants, but not function declarations. * So we need to check if the constants are defined separately from * the functions to enable supporting process isolation in userland * code. */ } /** * Hash the password using the specified algorithm * * @param string $password The password to hash * @param int $algo The algorithm to use (Defined by PASSWORD_* constants) * @param array $options The options for the algorithm to use * * @return string|false The hashed password, or false on error. */ return null; } $password = (string) $password; } return null; } trigger_error("password_hash() expects parameter 2 to be long, " . gettype($algo) . " given", E_USER_WARNING); return null; } $resultLength = 0; switch ($algo) { case PASSWORD_BCRYPT: $cost = PASSWORD_BCRYPT_DEFAULT_COST; $cost = $options['cost']; if ($cost < 4 || $cost > 31) { trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING); return null; } } // The length of salt to generate $raw_salt_len = 16; // The length required in the final serialization $required_salt_len = 22; // The expected length of the final crypt() output $resultLength = 60; break; default: trigger_error(sprintf("password_hash(): Unknown password hashing algorithm: %s", $algo), E_USER_WARNING); return null; } $salt_requires_encoding = false; case 'NULL': case 'boolean': case 'integer': case 'double': case 'string': $salt = (string) $options['salt']; break; case 'object': $salt = (string) $options['salt']; break; } case 'array': case 'resource': default: return null; } ...
¿Qué podrá estar mal?