note 72032 rejected from language.oop5.typehinting by nlopess
| From: | nlopess@php.net | Date: | Fri, 29 Dec 2006 23:42:55 +0000 |
| Subject: | note 72032 rejected from language.oop5.typehinting by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121025@lists.php.net to get a copy of this message | ||
Note Submitter: jzakhar at gmail dot com
----
Something I got hung up on with regards to type hinting
<?php
class asdf
{
public $data;
function __construct()
{
$this->data = '1';
}
function foo( asdf $var )
{
print $var;
}
}
$x = new asdf();
$x->foo( $x->data );
?>
That fails, and its intended behavior, which begs the question, where is the value in type hinting?