Re: Proposed changes to PHP language

From: Date: Wed, 06 Mar 2013 13:34:01 +0000
Subject: Re: Proposed changes to PHP language
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
>
>
>      2. Introduce base class for all PHP classes. E.g. Object. It would
>> help
>>     in type hinting and allow to add new common methods without any magic.
>>
> Introduce a type-hint “object” would be better I think. It would replace
> is_object call.


I wonder how much BC breakage there would be introducing an Object class /
type-hint though. Right now it's perfectly acceptable to define a class
called Object (or object).

An ugly solution could be to re-use stdClass as the base of all classes.


Thread (8 messages)

« previous php.internals (#66490) next »