Dan Ackroyd wrote on 29/01/2016 13:56:
On 29 January 2016 at 10:46, Rowan Collins wrote:
You appear to be suggesting that "get_class()" should behave differently
than "get_class(null)".
I don't know if internal parameter handling (ZPP) works like userland
parameters
Regardless of how internals
On 29 January 2016 at 10:46, Rowan Collins wrote:
>
> You appear to be suggesting that "get_class()" should behave differently
> than "get_class(null)".
> I don't know if internal parameter handling (ZPP) works like userland
> parameters
Regardless of how internals works, it's a thing in userland
On 28 January 2016 at 23:22, Lorenzo Fontana wrote:
>
> Yes is what I would like to do, start saying people that they should change
> that by triggering a deprecation notice so they can refactor their code.
I don't think we need a deprecation notice. The behaviour when the
function is passed a nu
Dan Ackroyd wrote on 28/01/2016 22:35:
## Refactoring if non-objects are no longer allowed.
Current code:
echo get_class($result);
Would need to be changed to:
if ($result === null) {
echo get_class();
}
else {
echo get_class($result);
}
You appear to be suggesting that "get_class()" sh
2016-01-29 0:22 GMT+01:00 Lorenzo Fontana :
> 2016-01-28 23:35 GMT+01:00 Dan Ackroyd :
>
>> On 28 January 2016 at 19:17, Lorenzo Fontana
>> wrote:
>> > Hello everybody!
>>
>> Hello Lorenzo,
>>
>>
>> > If *$result* is *null* the output of *get_class* is the name of the
>> > containing class instea
2016-01-28 23:35 GMT+01:00 Dan Ackroyd :
> On 28 January 2016 at 19:17, Lorenzo Fontana
> wrote:
> > Hello everybody!
>
> Hello Lorenzo,
>
>
> > If *$result* is *null* the output of *get_class* is the name of the
> > containing class instead of the name of the object I wanted.
>
> Yes, that is ba
On 28 January 2016 at 19:17, Lorenzo Fontana wrote:
> Hello everybody!
Hello Lorenzo,
> If *$result* is *null* the output of *get_class* is the name of the
> containing class instead of the name of the object I wanted.
Yes, that is bad. Perhaps a smaller change would give you the desired
behav
Hello everybody!
At the moment the *get_class *function has three possible behaviors
- *get_class* is called with the instance of the class and return the name
of the class name of the instance;
- *get_class* is called without any parameters inside a class and return
the containing class name
- *g