php-src/Zend/tests/bug37811.phpt
Steph Fox 6d8760677d - killed off UEXPECT
- altered EXPECT for parser errors. This may or may not be a Good Thing.
2008-05-26 14:33:44 +00:00

29 lines
468 B
PHP
Executable File

--TEST--
Bug #37811 (define not using toString on objects)
--FILE--
<?php
class TestClass
{
function __toString()
{
return "Foo";
}
}
define("Bar",new TestClass);
var_dump(Bar);
define("Baz",new stdClass);
var_dump(Baz);
?>
===DONE===
--EXPECTF--
unicode(3) "Foo"
Warning: Constants may only evaluate to scalar values in %sbug37811.php on line %d
Notice: Use of undefined constant Baz - assumed 'Baz' in %sbug37811.php on line %d
unicode(3) "Baz"
===DONE===