mirror of
https://github.com/php/php-src.git
synced 2024-10-06 17:26:11 +00:00
227295a4f1
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.
43 lines
722 B
PHP
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
|