我对这个代码的学说有问题我无法解释.
public function fromArray(array $array, $deep = true) {
$refresh = false;
foreach ($array as $key => $value) {
if ($key == '_identifier') {
$refresh = true;
$this->assignIdentifier($value);
continue;
}
Run Code Online (Sandbox Code Playgroud)
我的键(整数)0将等于(字符串)'_identifier'.这是PHP中的错误还是正常的?或者我做错了什么?
当我将代码更改为$key === '_identifier'
有效时.我有PHP版本5.3.4