PCRE question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

It was my understanding that when the PCRE module was loaded in php
that constants would be available that were built in to that module.
For example, I need to use some flags with my regular expression, but
they don't seem to be loaded.  Here's an example:


the lines above produce this output

string(14) "PCRE_MULTILINE"
string(11) "PCRE_DOTALL"
string(14) "PCRE_M_\UMLINE"

Shouldn't those be long values rather than string values?

Could there be a configuration problem with my WAMP test environment?


Re: PCRE question

*** Daniel escribió/wrote (Wed, 22 Oct 2008 12:10:30 -0700 (PDT)):
Quoted text here. Click to load it

Yes, it seems you haven't enabled the error reporting. Find your php.ini
file and set these values:

display_errors = On
error_reporting  =  E_ALL | E_STRICT

According to the PHP manual all the constants of the extension begin with
PREG_* so you should get a notice about undefined constants:


-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com

Site Timeline