php-src/ext/tokenizer/tests/003.phpt
Dmitry Stogov 227295a4f1 Unicode stuff is changed according to decision maden on PDM.
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
2006-01-17 12:18:53 +00:00

43 lines
722 B
PHP

--TEST--
token_get_all() and wrong parameters
--SKIPIF--
<?php if (!extension_loaded("tokenizer")) print "skip"; ?>
--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 native string, array given in %s on line %d
NULL
Warning: token_get_all() expects parameter 1 to be native string, object given in %s on line %d
NULL
array(0) {
}
array(1) {
[0]=>
array(2) {
[0]=>
int(312)
[1]=>
string(1) "0"
}
}
array(1) {
[0]=>
array(2) {
[0]=>
int(312)
[1]=>
string(2) "-1"
}
}
Done