PHPWTF : PHP

Ask questions about frameworks, try your hand at php golf and strike gold or simply show off your latest work.

Latest articles

/u/Almamu on PHPWTF

explode and implode

/u/indatawetrust on PHPWTF

https://s-media-cache-ak0.pinimg.com/originals/95/dc/1f/95dc1faebf2b7947c56cca0fcea44a25.gif

/u/Hall_of_Famer on PHPWTF

I think something like this has been posted more than a year ago, why did you post again? Are you so bored?

/u/j1mb34m on PHPWTF

my favorite is the function that takes two arguments and order doesn't matter. sry, don't recall which one as I thankfully haven't written php since switching jobs.

/u/TotesMessenger on PHPWTF

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit: [/r/lolphp] PHPWTF If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads.(Info/Contact)

/u/the_alias_of_andrea on PHPWTF

They must be for 5.3 or below given the time they were posted.

/u/the_alias_of_andrea on PHPWTF

Let's go through them! Default arguments and type hinting This is an interesting one. Why is null special? The poor parser is easily confused This one is not a parser bug, but a consequence of PHP not requiring a leading digit in a float. So it's not valid really. instanceof is smart I'm not sure how to feel on this one. It's basically just a...

/u/the_alias_of_andrea on PHPWTF

Let's take the first example that the author claims is supposed to work on 5.4+. Even PHPStorm says this will throw a parser error from PHP 5.2 all that way up to PHP 7.0. The php Array never did implement __invoke() wtf did he/she expect to happen? PHP's arrays aren't objects (they can't "implement __invoke"), and this isn't a parser error. This really...

/u/credomane on PHPWTF

The HTML on both of them is from the early 00's at best. :P

/u/credomane on PHPWTF

I'm reading over your link and the list($a, $a) is the only one I see being odd. The rest are obvious errors or abusing bad programming practices that are being blamed on php. Let's take the first example that the author claims is supposed to work on 5.4+. Even PHPStorm says this will throw a parser error from PHP 5.2 all that way up to PHP 7.0. The...

Discover, share and read the best on the web

Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!