Upecao sam nešto :-)
PHP kôd:
<?php
class parent
{
var $child;
function parent ()
{
$this -> child = new child ();
}
function getChild ()
{
return $this -> child;
}
}
class child
{
var $property;
function setValue ($value)
{
$this -> property = $value;
}
function getValue ()
{
return (string) (int) (bool) $this -> property;
}
}
$parent = new parent ();
@ $child = & $parent -> getChild ();
$parent -> child -> setValue (1);
die (PHP_VERSION . ' : ' . $child -> getValue ());
?>
Outputi su
i
:-)))
probajte u peticama, živo me interesuje...