I am trying to allow a few functions that are all contained in one script to pass by reference. I don’t want to turn this on globally but when I add the following directive in the script where I want pass by reference, I still see the PHP warnings:
Deprecated: Call-time pass-by-reference has been deprecated
I was expecting to see those warnings go away after I overrode the PHP INI file.
ini_set("allow_call_time_pass_reference", "true");
How do I do this or is that correct and the warnings are there because the PHP interpreter is not parsing my local ini_set() directive only reading php.ini?
http://php.net/manual/en/ini.core.php :
allow_call_time_pass_reference=> PHP_INI_PERDIRhttp://php.net/manual/en/configuration.changes.modes.php :
PHP_INI_PERDIR=> Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)Answer: you can’t set it with
ini_set.And if you will be using php 5.4.0, this configuration option has been removed.