![]() ![]() | ![]() |
1.1 ! misho 1: --TEST-- ! 2: filter_var() and default values ! 3: --SKIPIF-- ! 4: <?php if (!extension_loaded("filter")) die("skip"); ?> ! 5: --FILE-- ! 6: <?php ! 7: $tmp = $default = 321; ! 8: var_dump(filter_var("123asd", FILTER_VALIDATE_INT, array("options"=>array("default"=>$default)))); ! 9: ?> ! 10: --EXPECT-- ! 11: int(321)