Mantis - Quercus
Viewing Issue Advanced Details
4063 minor always 06-02-10 03:23 05-04-14 13:08
hm2k  
nam  
normal  
closed 4.0.7  
fixed  
none    
none  
0004063: string::1: Fatal Error: 'filter_var' is an unknown function.
Example 0000001 A filter_var() example
<?php
var_dump(filter_var('bob@example.com', FILTER_VALIDATE_EMAIL));
var_dump(filter_var('example.com', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED));
?>

The above example should output:

string(15) "bob@example.com"
bool(false)

Instead it returns the following error:

string::1: Fatal Error: 'filter_var' is an unknown function.
See http://php.net/manual/en/function.filter-var.php [^]

Notes
(0004626)
sblommers   
06-02-10 05:35   
Looks like it's not implemented yet, I get the same error on the latest SVN build.
(0004857)
gbruins   
11-19-10 09:32   
I am able to use filter_var, but FILTER_VALIDATE_EMAIL does not work properly:

var_dump(filter_var('bob@example.com', FILTER_VALIDATE_EMAIL)); // bool(false)
(0006442)
nam   
05-04-14 13:07   
filter_var() was implemented a while back.

FILTER_VALIDATE_URL is not yet implemented: http://bugs.caucho.com/view.php?id=5730 [^]