Re: pcre little problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4 November 2011 16:52, QI.VOLMAR QI <qi.volmar@xxxxxxxxx> wrote:

> i have this part of code that works with DOMDocument:
>
> public function translateNFeXML(NFE $nfe_factory) {
>        $inf_adic = $nfe_factory->createElement('infAdic');
>        if ($this->inf_ad_fisco) {
>            $inf_adic_fisco =
> $nfe_factory->createElement('infAdicFisco', $this->inf_ad_fisco);
>            $inf_adic->appendChild($inf_adic_fisco);
>        }
>
>        $string = "a=10&b[]=20&c=30n°&d=40+:50";
>        die(preg_filter('/[^:][[:punct:]]/', '', $string));
>        $inf_cpl = $nfe_factory->createElement('infCpl',
> $this->inf_complementar);
>
> QUESTION: Why the preg_filter causes a end of the application, with no
> error throwing (even in die don't appears nothing)?


preg_filter() returns NULL if there are no matches and the subject is a
string.

And ...

php -r "die(null);"

outputs nothing.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux