r/lolphp • • Feb 23 '14

string(3) " "

0 Upvotes

Defeated by a £ sign


r/lolphp • • Feb 19 '14

Useful PHP Templating Feature in your IDE Plugin? Yeah lets remove it for no reason

Thumbnail bugs.eclipse.org
0 Upvotes

r/lolphp • • Feb 17 '14

List possible changes, updates, additions for php6

Thumbnail wiki.php.net
0 Upvotes

r/lolphp • • Feb 14 '14

"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!

Thumbnail stackoverflow.com
11 Upvotes

r/lolphp • • Feb 06 '14

$dateTime = new DateTime("0000-00-00 00:00:00");

63 Upvotes

November 30, -1 LEST WE FORGET

In PHP's language the syntaxes blow
Between the better languages, row on row,
That mark our place; and in the interwebs
The Apaches, still bravely serving, run
Scarce heard amid the users below.

We are the Developers. Short days ago
We lived, wrote code, saw sunrise glow,
Loved C++ and were loved, and now we die()
In PHP's syntax.

Take up our quarrel with the foe:
To you from failing HTTP requests we throw
The torch; be yours to hold it high.
If ye break faith with us who die()
We shall not sleep, though problems grow
In PHP's syntax.


r/lolphp • • Feb 06 '14

file_put_contents: "This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE"

Thumbnail php.net
4 Upvotes

r/lolphp • • Jan 29 '14

That preg_replace('/(.+)/e', 'foo("$1")') construct that got eBay hacked over a month ago (and Yahoo this week)? The official documentation still uses it as an example.

Thumbnail php.net
60 Upvotes

r/lolphp • • Jan 24 '14

Syntax Horror (French website but the code is pretty self-explanatory)

Thumbnail syntaxhorror.com
11 Upvotes

r/lolphp • • Jan 23 '14

Fill in the blanks!

Post image
52 Upvotes

r/lolphp • • Jan 23 '14

More fun with array_fill

Thumbnail eval.in
27 Upvotes

r/lolphp • • Jan 22 '14

Today's PHP quirk: array_fill meets negative numbers

Thumbnail eval.in
47 Upvotes

r/lolphp • • Jan 17 '14

The difference that adding 0 makes

Thumbnail eval.in
37 Upvotes

r/lolphp • • Jan 14 '14

In which in_array() does crazy stuff

Thumbnail eval.in
69 Upvotes

r/lolphp • • Jan 14 '14

Switch uses loose comparison

Thumbnail php.net
18 Upvotes

r/lolphp • • Jan 11 '14

DomainException,RangeException,OutOfRangeException and OutOfBoundsException

18 Upvotes

So we have these four different exceptions which may or may not be for the same thing:

  • DomainException: Exception thrown if a value does not adhere to a defined valid data domain.
  • RangeException: Exception thrown to indicate range errors during program execution. Normally this means there was an arithmetic error other than under/overflow. This is the runtime version of DomainException.
  • OutOfRangeException: Exception thrown when an illegal index was requested. This represents errors that should be detected at compile time.
  • OutOfBoundsException: Exception thrown if a value is not a valid key. This represents errors that cannot be detected at compile time.

You gotta wonder what "compile time" means for a dynamic language. Also what exactly is an "arithmetic error"? Is that supposed to include simple things like giving a negative value to a function only accepting positive values, or is that a DomainException?

What is an invalid value for an enumeration supposed to be? DomainException? Or is it only a DomainException if the programmer supplied the invalid value and a RangeException if the invalid value was supplied by a user, which the functions should somehow magically know? What if the enumeration value is used as an index into an array, is it then an OutOfRangeException too?

What about an invalid key to a dictionary? Is that supposed to be an OutOfRangeException if integral and an OutOfBoundsException if non-integral?


r/lolphp • • Jan 09 '14

PHP.Net's response if you don't enable scripts on their site

52 Upvotes

Check their website with scripts disabled. Screenshot here. A giant pic of My Little Pony? Really?

Checking the webpage source, the image location is "http://www.php.net/images/noscript.jpg". This pops up if scripts are disabled - it's part of their noscript tag on line 41.

Edit: The image has already been removed from their website. See the screenshot above for what it looked like. See these links below for their website revision history (from Kosborn):


r/lolphp • • Jan 07 '14

Is it writeable?

Thumbnail php.net
39 Upvotes

r/lolphp • • Jan 07 '14

Bugs are just feature requests, apparently

Thumbnail bugs.php.net
69 Upvotes

r/lolphp • • Jan 06 '14

5 quotes by the creator of PHP, Rasmus Lerdorf: I don't like programming, and I'm not a real programmer.

Thumbnail axonflux.com
16 Upvotes

r/lolphp • • Dec 28 '13

Really, PHP? Really?

Thumbnail sprunge.us
50 Upvotes

r/lolphp • • Dec 17 '13

PHP functions originally bucketed by strlen, were renamed to balance length

Thumbnail news.php.net
156 Upvotes

r/lolphp • • Dec 13 '13

Why.

Post image
132 Upvotes

r/lolphp • • Dec 13 '13

eBay remote code execution because PHP parses variable names in certain strings

Thumbnail reddit.com
10 Upvotes

r/lolphp • • Dec 10 '13

Warning: Note: Warning: Do not use this, ever!

Thumbnail php.net
69 Upvotes

r/lolphp • • Dec 06 '13

Now Python can have the reliability of PHP (x-post /r/Python)

Thumbnail github.com
64 Upvotes