note 93534 added to language.oop5.typehinting

From: Date: Tue, 15 Sep 2009 08:22:32 +0000
Subject: note 93534 added to language.oop5.typehinting
Groups: php.notes 
Request: Send a blank email to php-notes+get-160570@lists.php.net to get a copy of this message
Please note that when using the type hinting class together with namespaces, you're asking for trouble: <?php namespace a { interface A { public function execute(string $sth); } } namespace a\b { class B implements a\A { public function execute(string $sth){} // Wrong public function execute(a\string $sth){} // Correct } } // Causes a fatal error on this line. 'string' is considered an object from the namespace 'a' ?> ---- Server IP: 64.71.164.2 Probable Submitter: 83.80.87.214 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.typehinting.php Edit -- https://master.php.net/note/edit/93534 Del: integrated -- https://master.php.net/note/delete/93534/integrated Del: useless -- https://master.php.net/note/delete/93534/useless Del: bad code -- https://master.php.net/note/delete/93534/bad+code Del: spam -- https://master.php.net/note/delete/93534/spam Del: non-english -- https://master.php.net/note/delete/93534/non-english Del: in docs -- https://master.php.net/note/delete/93534/in+docs Del: other reasons-- https://master.php.net/note/delete/93534 Reject -- https://master.php.net/note/reject/93534 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160570) next »