1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/tokenizer/tests/003.phpt
T
Antony Dovgal 701dfc56b5 two more tests
2005-12-01 18:23:08 +00:00

41 lines
638 B
PHP

--TEST--
token_get_all() and wrong parameters
--FILE--
<?php
var_dump(token_get_all(array()));
var_dump(token_get_all(new stdClass));
var_dump(token_get_all(""));
var_dump(token_get_all(0));
var_dump(token_get_all(-1));
echo "Done\n";
?>
--EXPECTF--
Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
NULL
Warning: token_get_all() expects parameter 1 to be string, object given in %s on line %d
NULL
array(0) {
}
array(1) {
[0]=>
array(2) {
[0]=>
int(311)
[1]=>
string(1) "0"
}
}
array(1) {
[0]=>
array(2) {
[0]=>
int(311)
[1]=>
string(2) "-1"
}
}
Done