我的配置文件中有这样的结构:
<?php
if (true) {
$nonstatic = 1;
static $config = 1;
}
else {
$nonstatic = 2;
static $config = 2;
}
echo $nonstatic;
echo $config;
?>
那么,如果这部分语句为假且 $nonstatic 包含 1,为什么 $config 包含 2?它是一个错误吗?
我的配置文件中有这样的结构:
<?php
if (true) {
$nonstatic = 1;
static $config = 1;
}
else {
$nonstatic = 2;
static $config = 2;
}
echo $nonstatic;
echo $config;
?>
那么,如果这部分语句为假且 $nonstatic 包含 1,为什么 $config 包含 2?它是一个错误吗?