Search code examples
phpdeprecatedphp4

Deprecated warning only in some php5 environments?


We're moving from php4 to php5, and we get this warning on one of our developers machines, but not in our php5 test setup:

Deprecated: Call-time pass-by-reference has been deprecated in C:\Workspace\Prelive\www\includes\filename etc..

The code seems to be the same in both environments, and the php.ini on the test environment has this setup for errors:

error_reporting = E_STRICT | E_ALL

We could ofcourse just fix the code so the warning will go away, but my main concern is why the test environment is not complaining about it.


Solution

  • There is a php.ini directive called allow_call_time_pass_reference, which may be off in the environment which does not complain about it.