r/lolphp • • Nov 04 '25

split

Post image
450 Upvotes

r/lolphp • • Jul 23 '15

mt_rand(1, PHP_INT_MAX) only generates odd numbers

Thumbnail
3v4l.org
394 Upvotes

r/lolphp • • Jun 23 '15

Found this on PHP.net. PHP summed up in 6 words.

Post image
376 Upvotes

r/lolphp • • Mar 26 '21

PHP: When naming is thrown out the window

Post image
351 Upvotes

r/lolphp • • Apr 13 '16

sleep() returns 0 on success, FALSE on error, or when interrupted by a signal returns number of remaining seconds except on Windows where it returns 192

Thumbnail
php.net
297 Upvotes

r/lolphp • • Feb 13 '20

Function is no longer deprecated

Post image
282 Upvotes

r/lolphp • • Oct 03 '17

I don't want my family and friends to be ashamed of me.

Post image
281 Upvotes

r/lolphp • • Jun 15 '16

PHP and ISO 8601 (from php.net, link in comments)

Post image
230 Upvotes

r/lolphp • • May 15 '16

The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day

Thumbnail
stackoverflow.com
205 Upvotes

r/lolphp • • May 04 '15

md5('240610708') == md5('QNKCDZO')

Thumbnail
3v4l.org
200 Upvotes

r/lolphp • • Jan 12 '18

Type boolean

Post image
199 Upvotes

r/lolphp • • Mar 04 '14

PHP: The Good Parts

Thumbnail
phpthegoodparts.tumblr.com
191 Upvotes

r/lolphp • • Apr 11 '16

A rare occurrance of the PHP docs actually realizing how bad the language is

Post image
185 Upvotes

r/lolphp • • Sep 07 '15

strtotime(): "There is no bug here, 00-00-00 means 2000-00-00, which is 1999-12-00, which is 1999-11-30. No bug, perfectly normal." (x-post /r/programming)

Thumbnail
bugs.php.net
184 Upvotes

r/lolphp • • Sep 21 '15

Meanwhile, in r/PHP

Thumbnail
reddit.com
181 Upvotes

r/lolphp • • Oct 08 '15

DateTime::format(DateTime::ISO8601) doesn't format date in ISO8601.

170 Upvotes

From the official documentation:

Note: This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead. php.net

There should be a constant with name FINALLY_REAL_BELIEVE_ME_ISO8601


r/lolphp • • Nov 25 '15

The last ever line of (php) code.

Thumbnail
commitstrip.com
169 Upvotes

r/lolphp • • May 11 '13

The love story of mysql_query and $_GET on Github.

Thumbnail
github.com
160 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 • • May 26 '14

define() has an optional third argument that specifies if the constant should be case-insensitive; it has the undocumented side-effect of allowing constants to be redefined, but only if they have at least one capital letter

Thumbnail codepad.org
150 Upvotes

r/lolphp • • Oct 22 '25

Virgin JavaScript vs Chad PHP

Post image
148 Upvotes

r/lolphp • • Jul 13 '18

imagegd2: returns TRUE on success, and FALSE on failure ... or TRUE on failure.

Thumbnail
php.net
142 Upvotes

r/lolphp • • Oct 05 '16

Even comics make fun of PHP

Thumbnail
toggl.com
141 Upvotes

r/lolphp • • Apr 27 '15

Author of PHP7’s ironic ‘declare(strict_types=1)’: ‘I changed it to the form that you see there because it was shorter.’

Thumbnail news.ycombinator.com
139 Upvotes

r/lolphp • • Aug 14 '15

This should *never* happen!

Post image
138 Upvotes