|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-28 17:02 UTC] phpbugs at localpin dot com
(I think this is supposed to be fixed 'in CVS' whatever that means, but just in case...) similar_text() requires a parameter by reference but generates a warning for doing so! My log file is thus packed with warnings as follows, and I must switch off the php.ini setting which warns about such things. [Mon Apr 28 23:37:25 2003] [error] PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of similar_text(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. I am told to "modify the declaration of similar_text()", a PHP function! I would suggest that if PHP is deprecating pass-by-reference: - this function be changed ASAP - this function (and any others) that are part of PHP and use reference variables do not issue a warning - at the very least, a note in the documentation for similar_text() about this. It is my aim (and the general aim of good programming I suppose) to log and fix ALL errors, but this one makes this aim impossible unless I switch this error off completely! Thanks! PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
<?php similar_text('foo', 'fubar', $sim); echo $sim; ?> will do; No "&" is needed in the third parameter.