Doc #62061 [Opn->Spm]: --- From manual page: http://www.php.net/function.str-replace --- "If search is

From: Date: Fri, 18 May 2012 17:18:33 +0000
Subject: Doc #62061 [Opn->Spm]: --- From manual page: http://www.php.net/function.str-replace --- "If search is
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8373@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62061&edit=1 ID: 62061 Updated by: danbrown@php.net Reported by: steward at stewardware dot com Summary: --- From manual page: http://www.php.net/function.str-replace --- "If search is -Status: Open +Status: Spam Type: Documentation Problem Package: Documentation problem Operating System: MCOSX10.6 PHP Version: 5.4.3 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2012-05-18 17:11:48] steward at stewardware dot com Description: ------------ --- From manual page: http://www.php.net/function.str-replace --- "If search is an array and replace is a string, then this replacement string is used for every value of search. The converse would not make sense, though." $sql="SELECT * FROM BLAH WHERE name=? OR email=?" $bindings=array('me','user@example.com') Isn't that the converse? Test script: --------------- --- From manual page: http://www.php.net/function.str-replace --- "If search is an array and replace is a string, then this replacement string is used for every value of search. The converse would not make sense, though." $sql="SELECT * FROM BLAH WHERE name=? OR email=?" $bindings=array('me','user@example.com') Isn't that the converse? Expected result: ---------------- --- From manual page: http://www.php.net/function.str-replace --- "If search is an array and replace is a string, then this replacement string is used for every value of search. The converse would not make sense, though." $sql="SELECT * FROM BLAH WHERE name=? OR email=?" $bindings=array('me','user@example.com') Isn't that the converse? Actual result: -------------- --- From manual page: http://www.php.net/function.str-replace --- "If search is an array and replace is a string, then this replacement string is used for every value of search. The converse would not make sense, though." $sql="SELECT * FROM BLAH WHERE name=? OR email=?" $bindings=array('me','user@example.com') Isn't that the converse? ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62061&edit=1

« previous php.doc.bugs (#8373) next »