php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /var/www/html/sub/images/sym/root/proc/self/root/opt/php-7.0.1/Zend/tests/ |
| files >> /var/www/html/sub/images/sym/root/proc/self/root/opt/php-7.0.1/Zend/tests/cast_to_object.phpt |
--TEST--
casting different variables to object
--FILE--
<?php
$r = fopen(__FILE__, "r");
class test {
function __toString() {
return "10";
}
}
$o = new test;
$vars = array(
"string",
"8754456",
"",
"\0",
9876545,
0.10,
array(),
array(1,2,3),
false,
true,
NULL,
$r,
$o
);
foreach ($vars as $var) {
$tmp = (object)$var;
var_dump($tmp);
}
echo "Done\n";
?>
--EXPECTF--
object(stdClass)#%d (1) {
["scalar"]=>
string(6) "string"
}
object(stdClass)#%d (1) {
["scalar"]=>
string(7) "8754456"
}
object(stdClass)#%d (1) {
["scalar"]=>
string(0) ""
}
object(stdClass)#%d (1) {
["scalar"]=>
string(1) "