xdebug-trace-gui icon indicating copy to clipboard operation
xdebug-trace-gui copied to clipboard

Incompatibility with old versions of PHP from 5.2.17 (inclusively).

Open jackka opened this issue 11 years ago • 0 comments

Hello Alex, Your fork it is great extension for the initial code and I use just it with pleasure. But I've faced with 5.2.17 PHP incompatibility when I tried to trace some big project which was written with an old PHP version. I thought that debugging tools have to have maximum of compatibility, because we do not know how ancient their bugs will be. :) Do you agree with me? :)

If you want, you can see how I worked around the issue here https://github.com/jackka/xdebug-trace-gui/commit/98207004f214e20989f06e0e396ba632322988f0. But it just quick fix and this variant would be nicer if the anonymous functions will be rewritten in old style like functions which have names and without closure. If I'll have time, I do it myself. But unfortunately I'm not sure.

Thanks in advance.

P.S. Addition info. Error messages were the following: "Parse error: syntax error, unexpected T_FUNCTION in C:\apache\Apache2\htdocs\xdebug-trace-gui\noutrace.class.php on line 77" and then: "Parse error: syntax error, unexpected T_FUNCTION in C:\apache\Apache2\htdocs\xdebug-trace-gui\trace.config.php on line 34"

Links with explanations where I've got an info for my quick fix:

  1. Suggestion how to increase compatibility with create_function using: http://stackoverflow.com/questions/4949573/parse-error-syntax-error-unexpected-t-function-line-10-help
  2. Short example how to use create_function: http://stackoverflow.com/questions/13362606/parse-error-syntax-error-unexpected-t-function-in

jackka avatar Mar 07 '14 06:03 jackka