Re: Proposed changes to PHP language
>
>
> 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)