求解释这段代码
<?php
#test 1
if(!isset($foo{5}))
{
echo 'fool short';
}
#test 2
$foo = 4;
if(!isset($foo{5}))
{
echo 'fool short';
}
#test 3
$foo = 9;
if(!isset($foo{5}))
{
echo 'fool short';
}
?>
我测试了下输出了三个foo short
为什么?那个判断句在判断什么
大家看我刚试的:
#test 5 有输出
$foo = 'hjkldsior';
if(!isset($foo{5}))
{
echo 'fool short';
}
#test 6 没有输出
$foo = 'huoejiof';
if(!isset($foo{2-3}))
{
echo 'fool short';
}
$foo='agjgpmgjgtj';