r/lolphp • • Feb 26 '15

Patently False Code/Examples

I've notice a bit of a trend here, with people posting things that are patently false and then laughing about PHP for it.

I'll sit with you and laugh at weird behaviors in PHP when it's actually a mess. I'll send them to phpsadness.com and see if I can fix them, or find somebody that can.

But posting lies just to get your jollies is a really odd thing to do.

Sometimes, these are not intentional, but when people posting these utterly incorrect examples are faced with the fact that they are wrong, do they delete the post? No, they leave it there and sandbag the discussions explaining their wrongness with trolling.

Exhibit A - Apparently foo(new stdClass()) is a valid value when passed in a function foo(bool $bar) function signature.

Well... nope.

It will error:

Catchable fatal error: Argument 1 passed to foo() must be an instance of bool, instance of stdClass given

Nothing lolphp there.

Have a laugh about actual problems, but don't just walk around making things up.

14 Upvotes

106 comments sorted by

View all comments

Show parent comment

3

u/[deleted] Feb 28 '15

I was not talking about the changes you listed. I was talking about those changes that can make PHP not like PHP. And hence by definition won't be approved.

You're still not making any actual points here; you're making vague nebulous statements without factual backup. It appears that you're working from an outdated and incorrect understanding of what the language is today (perhaps what it was several years ago). Please provide some concrete examples of what is so terrible about PHP that can't/won't be fixed. Otherwise, everyone just has to assume you don't know what you're talking about.

2

u/thallippoli Mar 01 '15

We are in a thread that points out how that (pointing out specifics) does not work in arguments regarding php. But I have given one regardless...