Req #43102 [Opn->Wfx]: Request for type hinting of class properties

From: Date: Sat, 05 May 2018 19:03:12 +0000
Subject: Req #43102 [Opn->Wfx]: Request for type hinting of class properties
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215080@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=43102&edit=1 ID: 43102 Updated by: requinix@php.net Reported by: fjas at free dot fr Summary: Request for type hinting of class properties -Status: Open +Status: Wont fix Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: All PHP Version: 5.2.4 Block user comment: N Private report: N New Comment: Considered and declined. https://wiki.php.net/rfc/typed-properties Previous Comments: ------------------------------------------------------------------------ [2007-10-24 20:59:50] fjas at free dot fr Description: ------------ PHP5 allows to type hint function parameters. I like the possibility to have the choice, between type hinting, or not. But it would be so nice to have the same optional behaviour with class properties... Is it logical to allow type hinting for parameters, and not for properties ??? Expected result: ---------------- Class B { (...) } Class A { public B $b (...) } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=43102&edit=1

« previous php.bugs (#215080) next »