More recently, var_dump () in PHP (currently using 5.6.23) began to print the file name as well as the line number before actually resetting my variable. I don’t know of any major changes on the server, so I was wondering why this is happening and there is nothing to find on the Internet or in the PHP documentation ( var_dump () )
Strange behavior also occurs when using the command line:
> php -r 'var_dump("lol");' Command line code:1: string(3) "lol"
So far, I'm just used to "print line (3)" lol ".
This is not showstopper, but broke a couple of my unit tests, where I needed to compare some data from the API that prints with var_dump (). At first I thought it might be related to xdebug, but could not find any directive that seems to be related to this problem.
Any hint of what causes this is appreciated.
source share