Keith Devens .com |
Friday, August 29, 2008 | ![]() |
| A charlatan makes obscure what is clear; a thinker makes clear what is obscure. – Hugh Kingsmill | ||
|
| ← A testament to character | Coffeeeeee → |

Dennis Pallett (http://blog.nocertainty.com/) wrote:
Keith (http://keithdevens.com/) wrote:
Yes, it's optional, but if your regular expression delimiter is '/', and you have a '/' in your string, preg_quote without the [delimiter] argument won't escape it, and preg_quote would basically be useless.
I posted this because I actually did find a bug in someone else's PHP code because he didn't specify the [delimiter]. I have to tell him about his bug as soon as finals are over 
Dennis Pallett (http://blog.nocertainty.com/) wrote:
Oh, thanks, I didn't know this (still learning PHP) 
Dennis Pallett wrote:
Hehe, just came across this comment again. I'm now wondering why the hell I even asked that question. It's bloody obvious to use the [delimiter] argument. I know a bit more about PHP now 
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.274s.
(Used 8 db queries)

Why? It's an optional argument, right?