<?php
/* PHP devs, test & tell me I'm crazy. */
$x[] = '1';
if (empty($x[0]['x'])) {
echo 'No PHP bug.';
}
else {
echo 'PHP bug exists.';
}
?>
"PHP 버그가 있습니다."이것은 PHP 버그입니까?
<?php
/* PHP devs, test & tell me I'm crazy. */
$x[] = 1;
if (empty($x[0]['x'])) {
echo 'No PHP bug.';
}
else {
echo 'PHP bug exists.';
}
?>
"No PHP bug."
<?php
/* PHP devs, test & tell me I'm crazy. */
$x[] = '1';
if (!isset($x[0]['x'])) {
echo 'No PHP bug.';
}
else {
echo 'PHP bug exists.';
}
?>
출력 "PHP bug exists."
<?php
/* PHP devs, test & tell me I'm crazy. */
$x[] = '1';
if (!isset($x[0]['hello world'])) {
echo 'No PHP bug.';
}
else {
echo 'PHP bug exists.';
}
?>
출력 "PHP bug exists."
스칼라를 배열로 변환하는 것일 수도 있습니다. – RageZ