php中的调试器有问题(错误的bug行等)


Something wrong with the debugger in php (wrong bug lines, etc)

我觉得我的服务器闹鬼了。我在所有脚本

上都运行了这个。
ini_set('display_errors', 'On');
ini_set('html_errors', 0);

脚本this.php

出现错误
Notice: Undefined index: filter in /(...)/this.php on line 217

第217行甚至不是来自被调用的函数…它是一个空行,里面没有任何东西。

有时我在一个完美的逻辑流条件下运行一些echo(在它必须运行的意义上),它们什么也不回。有时确实如此。我只是注释了mysqliquery行,出于某种原因,它们继续查询并将内容保存到数据库中。我正在使用ubuntu的原生Connect to server功能,但也在filezilla中尝试过这个,它一直在发生。我知道文件在保存。但剧本似乎没有反应。这是我第一次面对这样的事情,真的很奇怪。我什么都想过了,但都不满意。重复/相似的函数名,错误的指令,include,文件缓冲区,但这一切似乎都在合理的标准之内。我不知道哪里出了问题。有人知道会发生什么吗?

场景:

通过nodejs运行php。一直工作到现在

one.php脚本中调用PHP函数first()

one.php:

include("this.php")
function first(){
    echo "This is echoed. This script works. I can remove and update this and line and it works well with the debugger"
    second(); //second is in this.php
}

this.php:

functions second(){
     echo "THIS GETS NO ECHO, IT'S THE FIRST LINE IN SECOND()"
     global $mysqli;
     //filter as index is in line 183, 168, 170, 185, 190.
     //line 217 is completely out of this function bounds.
     $query = "some query"
     $mysqli->query($query); //I commented this. Still gets query...
}

我真的真的不明白会发生什么。我检查和反复检查,只能假设这是文件缓冲区的问题或其他东西,因为代码对我来说似乎是正确的…

编辑:

我刚刚完全删除second()从this.php。代码运行起来就像什么都没发生一样。wtf……我在终端运行了cat this.php。代码似乎是最新的。

…我有两个不同的脚本与相同的名称在不同的文件夹…