I'm programming PHP for some time.
I use an Windows XP SP3 with PHP 5.4, SQlite 3, Apache 2.4 as a development environment. The remote host server (not mine) is a Windows Server 2008 with PHP 5.3, Apache 2.2, IIS 7.0 and SQL Server 2008.
My editor is the simple and wonderful EditPlus.
Concerning Javascript it's nice because of Firefox plus the great add-on FireBug, which allows for complete HTML + CSS + Javascript debugging.
My problem is PHP error management in my development environment (my personal machine).
The PHP syntax errors typically appear ok with line number and so on, allowing easy fix. Also there are online tools for check syntax (e.g pilliap) and other online tools to test the execution of PHP snippets (E.g writecodeonline.com )
However, my curse is runtime errors (eg, uninitialized variable $ _SESSION). Sometimes it shows correctly, but other times the error message (including the right line number!) are embedded within the source code, inside spurious HTML tags. Simple tests shows no problem. but my real code generally does.
It is not a situation that does stop me from moving forward, but it is unpleasant.
I did not find any hint on the Internet about this strange behavior and I'm very curious if somebody can give a clue about it.
My question: How is possible a PHP runtime-error sometimes appears in the browser (as desired in a development environment), sometimes it appears inside Javascript + HTML source code together spurious HTML tags?
PS: Is not a question about PHP log files or Display Error setting in PHP.Ini file.
PS2: The same situation happens with or without XDebug installed.