/
usr
/
local
/
lsws
/
phpbuild
/
php-8.0.7
/
Zend
/
tests
/
File Upload :
llllll
Current File: //usr/local/lsws/phpbuild/php-8.0.7/Zend/tests/bug37811.phpt
--TEST-- Bug #37811 (define not using toString on objects) --FILE-- <?php class TestClass { function __toString() { return "Foo"; } } define("Bar", new TestClass); var_dump(Bar); try { define("Baz", new stdClass); } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } try { var_dump(Baz); } catch (Error $exception) { echo $exception->getMessage() . "\n"; } ?> --EXPECT-- string(3) "Foo" define(): Argument #2 ($value) cannot be an object, stdClass given Undefined constant "Baz"
Copyright ©2k19 -
Hexid
|
Tex7ure