tony2001                Thu Aug 31 22:15:48 2006 UTC

  Added files:                 
    /php-src/ext/filter/tests   036.phpt 
  Log:
  new test
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/036.phpt?view=markup&rev=1.1
Index: php-src/ext/filter/tests/036.phpt
+++ php-src/ext/filter/tests/036.phpt
--TEST--
input_get_args() and references
--SKIPIF--
<?php if (!extension_loaded("filter")) print "skip"; ?>
--FILE--
<?php

$var = "1";

$data = array();
$data["test1"] = 1;
$data["test2"] = &$var;

$args = array();
$args["test1"] = FILTER_VALIDATE_INT;
$args["test2"] = FILTER_VALIDATE_INT;

$ret = input_get_args(INPUT_DATA, $args, $data);
var_dump($ret);
var_dump($data); //should be separated, i.e. not reference anymore. looks like 
we can't change this, or it'd change the original zval instead..
var_dump($var); //should be still string(1) "1"

echo "Done\n";
?>
--EXPECTF--     
array(2) {
  ["test1"]=>
  int(1)
  ["test2"]=>
  int(1)
}
array(2) {
  ["test1"]=>
  int(1)
  ["test2"]=>
  int(1)
}
string(1) "1"
Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to