/
usr
/
local
/
lsws
/
phpbuild
/
php-8.0.7
/
ext
/
tokenizer
/
tests
/
File Upload :
llllll
Current File: //usr/local/lsws/phpbuild/php-8.0.7/ext/tokenizer/tests/PhpToken_extension.phpt
--TEST-- Extending the PhpToken class --SKIPIF-- <?php if (!extension_loaded("tokenizer")) print "skip tokenizer extension not enabled"; ?> --FILE-- <?php $code = <<<'PHP' <?PHP FUNCTION FOO() { ECHO "bar"; } PHP; class MyPhpToken extends PhpToken { public int $extra = 123; public function getLoweredText(): string { return strtolower($this->text); } } foreach (MyPhpToken::tokenize($code) as $token) { echo $token->getLoweredText(); if ($token->extra !== 123) { echo "Missing property!\n"; } } ?> --EXPECT-- <?php function foo() { echo "bar"; }
Copyright ©2k19 -
Hexid
|
Tex7ure