tags:

views:

32

answers:

0
   $text = 'standard';
    if(valid::standard_text($text) == true){
        echo "Valid standard text";
    }else{
        echo "Invalid standard text";
    }

It is pretty strange the above should return "Valid standard text", though it is returning the opposite - though on the clients server it works fine. I am kinda leaning towards the idea that I am missing some extension. though it is strange. Is there are any special extension that is required?

I dug down, a little and it seems that under kohana

$text = 'standard';
$test =  (bool) preg_match('/^[\pL\pN\pZ\p{Pc}\p{Pd}\p{Po}]++$/uD', (string) $text);
var_dump($test);

returning false, though on the localhost on the clean php script it is evaluated as true so what might cause it?