标签:ret 一段 int content array out use ref 比较
在官方的文档有这么一端说明:Note a difference between 5.2 and 5.3 versions echo (int)strcmp(‘pending‘,array()); will output -1 in PHP 5.2.16 (probably in all versions prior 5.3) but will output 0 in PHP 5.3.3 Of course, you never need to use array as a parameter in string comparisions.大概意思就是5.3的之前和之后版本在使用strcmp比较数组和字符串时候的差异。 在5.3的版本之后使用这个函数比较会返回0,太令人迷恋了。。。<?php #$a=‘Hello world!‘; $password=$_GET[‘password‘]; #$a=True; #echo gettype($a); if(strcmp(‘Firebroo‘,$password)){ echo ‘NO!‘; }else{ echo ‘YES!‘; } #echo ord(‘a‘); ?>这样一段代码,原本的意图是输入Firebroo才能获得权限,但是在5.3版本之后捏,You just need input an array ,like this(?password[]=1) 看图![]()
查看原文:http://www.am0s.com/functions/201.html
标签:ret 一段 int content array out use ref 比较
原文地址:http://www.cnblogs.com/qiniuyhm/p/6366922.html