The result of sha1 in cli mode is inconsistent with that in web mode.

in the browser

echo sha1("$2y$10$zJ0JM2H6ec8kAoFYw3msN.jfqQ1cgqlWkmfB46Ipv0jy98mwmaxO.");

b9405961543e25c35b09252e82fe854c9ba19fd7

in Cli (under Linux)

php -r "echo sha1("$2y$10$zJ0JM2H6ec8kAoFYw3msN.jfqQ1cgqlWkmfB46Ipv0jy98mwmaxO.");";

a293a337641009205f14b2cc2cd39e1bf1916812

the two codes are consistent, but the results are not the same. What is the reason for this

Php
Mar.04,2022

this is a quotation mark problem


clipboard.png


sha1
mac(linux)


cli -r
clipboard.png


clipboard.png

sha1
clipboard.png

.


clipboard.png


php -r


(maclinuxphp)
php-cli


php -r
clipboard.png

reference\ $1 ~\ $n-- each parameter value added to the Shell. \ $1 is the first parameter,\ $2 is the second parameter
\ $2 the value is the y after the empty output,\ $1 is followed by 0 br bash will output 0, the zsh,0 I originally used was ignored, so only the value after outputting y
\ $z is ignored

this is about shell.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa788-46d1e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa788-46d1e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?