说PHP入门门槛低,其中一个原因是我们不需要关心变量的类型,PHP为我们做了自动的转化。但事实上是这样吗?下面就是一个隐蔽的bug。
字符串 == 比较类型强转隐患
http://php.net/manual/zh/language.operators.comparison.php
ps: php 7 优化和不兼容
PDO bindParam 要求第二个参数是一个引用变量
http://www.laruence.com/2012/10/16/2831.html
PHP 引用
https://glot.io/snippets/estgofa359
参考鸟哥一条微博
array_merge vs +
https://glot.io/snippets/estgpi43bc
浮点数精度问题
http://php.net/manual/zh/language.types.float.php
in_array switch
https://glot.io/snippets/esth249n0y
strpos
https://glot.io/snippets/esthlvjtki
curl 文件上传
http://php.net/manual/zh/curlfile.construct.php
foreach 顺序
json_decode
strtotime('-x month')