blob: e27a31b37e6636621f473bae4ea18a942dfd61b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--TEST--
callback function is a closure
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
<?php
$callback = function ($var) {
return $var;
};
$var = "test";
var_dump(filter_var($var, FILTER_CALLBACK, array('options'=> $callback)));
?>
--EXPECT--
string(4) "test"
|