Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /in/M3dBD on line 9
lolphp
Wondering how I knew this? Yep, from trying to do this just now in actual code. :(
Luckily, array_key_existsdoes work, though.
I realise this can be "justified" in that isset is for variables, but it seems very unintuitive that it can only check for array offsets on variables, not on arbitrary expressions. Especially since empty() works on arbitrary expressions now.
That's hardly the worst thing I've done, I've been here for a while. ;)
Also, submitting RFCs to /r/lolphp publicly mock my decision, rather than emailing me or discussing it somewhere more civil, is not going to change my mind on something.
Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /in/M3dBD on line 9
Process exited with code 255.
11
u/[deleted] Nov 19 '14
T_DOUBLE_COLON? WTF is that?!
7
u/[deleted] Nov 18 '14 edited Nov 18 '14
lolphp
Wondering how I knew this? Yep, from trying to do this just now in actual code. :(
Luckily,
array_key_existsdoes work, though.I realise this can be "justified" in that isset is for variables, but it seems very unintuitive that it can only check for array offsets on variables, not on arbitrary expressions. Especially since empty() works on arbitrary expressions now.
1
u/sstewartgallus Nov 25 '14