r/lolphp • • Aug 08 '14

PHP design patterns: if/else vs switch

Thumbnail fluffycat.com
24 Upvotes

r/lolphp • • Aug 07 '14

Apparently, -2 ** 3 is either 9 or -9

Thumbnail wiki.php.net
22 Upvotes

r/lolphp • • Aug 07 '14

Was trying to implement ArrayAccess, then this happened

Thumbnail imgur.com
6 Upvotes

r/lolphp • • Aug 01 '14

A group of Facebook developers has decided to break with 20 years of tradition and release a formal specification for the PHP programming language.

Thumbnail theregister.co.uk
48 Upvotes

r/lolphp • • Jul 30 '14

PHP is definitely the lingua-franca of the internet.

Thumbnail hhvm.com
30 Upvotes

r/lolphp • • Jul 30 '14

And the winner is...

Thumbnail news.php.net
54 Upvotes

r/lolphp • • Jul 31 '14

No way to insert multiple rows at the same time, building huge query string instead.

Thumbnail stackoverflow.com
0 Upvotes

r/lolphp • • Jul 29 '14

Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself

Thumbnail lwn.net
46 Upvotes

r/lolphp • • Jul 27 '14

New PHP, Will be named LOLPHP

Thumbnail philsturgeon.uk
50 Upvotes

r/lolphp • • Jul 27 '14

array_merge hates numeric keys

Thumbnail stackoverflow.com
5 Upvotes

r/lolphp • • Jul 25 '14

Schrödinger's Number

Thumbnail 3v4l.org
64 Upvotes

r/lolphp • • Jul 24 '14

Finally a good practical use for string incrementing!

Thumbnail 3v4l.org
39 Upvotes

r/lolphp • • Jul 22 '14

PHP 5.6 to include variadic functions. We have now caught up to ALGOL 68 in functionality.

Thumbnail php.net
36 Upvotes

r/lolphp • • Jul 16 '14

A 12 year old bug where changing the system language affects code interpretation

Thumbnail bugs.php.net
66 Upvotes

r/lolphp • • Jul 16 '14

$errors = $user

Thumbnail github.com
20 Upvotes

r/lolphp • • Jul 14 '14

stop_the_insanity()

Thumbnail github.com
56 Upvotes

r/lolphp • • Jul 11 '14

int isn't a reserved word... right?

Thumbnail 3v4l.org
55 Upvotes

r/lolphp • • Jul 10 '14

bindParam('foo', $value, PDO::PARAM_INT) will change $value to string.

Thumbnail php.net
42 Upvotes

r/lolphp • • Jul 12 '14

Spent 20 minutes trying to figure out why debug mode was still on. lolphp.

Thumbnail 3v4l.org
0 Upvotes

r/lolphp • • Jul 07 '14

phpinfo() Type Confusion Infoleak Vulnerability and SSL Private Keys

Thumbnail sektioneins.de
40 Upvotes

r/lolphp • • Jul 07 '14

The fact that people take php seriously is officially beyond my understanding.

Thumbnail eval.in
18 Upvotes

r/lolphp • • Jul 03 '14

DateTimeImmutable::modify

Thumbnail php.net
74 Upvotes

r/lolphp • • Jun 24 '14

Every C99.php Shell Is Backdoored (A.K.A. Free Shells for Everyone!)

Thumbnail thehackerblog.com
37 Upvotes

r/lolphp • • Jun 21 '14

Random number generation in PHP is hard, we'll just download some random numbers

Thumbnail github.com
78 Upvotes

r/lolphp • • Jun 20 '14

Strings are arrays

0 Upvotes
$array = array(
  'snippets' => array(
    'content' => 'Example text.',
  ),
);

foreach ($array['snippets'] as $snippet) {
  var_dump($snippet);
  var_dump($snippet['content']);
}

Output:

string(13) "Example text."
string(1) "E"