dis-bench / src /php /php-src /Zend /tests /closures /closure_015.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
388 Bytes
--TEST--
Closure 015: converting to string/unicode
--FILE--
<?php
$x = function() { return 1; };
try {
print (string) $x;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
try {
print $x;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Object of class Closure could not be converted to string
Object of class Closure could not be converted to string