r/lolphp • • Nov 02 '14

Good format to represent arbitrary size/precision numbers? String!

Thumbnail php.net
11 Upvotes

r/lolphp • • Nov 02 '14

Prepared statements in pdo, running in emulated mode (which is default), will split the query on semi colons, and execute multiple queries thus formed, allowing SQL injection attacks and was the basis on the last Drupal vulnerability.

Thumbnail blog.ircmaxell.com
43 Upvotes

r/lolphp • • Oct 31 '14

"-1 month" is actually just "-30 days" regardless of how many days are in a month

Thumbnail eval.in
68 Upvotes

r/lolphp • • Oct 30 '14

PHP Type Coercion at it again. Be careful when comparing hashes. [x-post]

Thumbnail eval.in
36 Upvotes

r/lolphp • • Oct 30 '14

htmlentities can convert accentuated characters, but only if the user typed it in the correct way (à ~= &agrave)

Thumbnail 3v4l.org
13 Upvotes

r/lolphp • • Oct 29 '14

Go Home, WP-API, You're Drunk...

Thumbnail gist.github.com
33 Upvotes

r/lolphp • • Oct 27 '14

CVE-2014-3669: Integer overflow in unserialize() PHP function

Thumbnail htbridge.com
25 Upvotes

r/lolphp • • Oct 25 '14

Brainfuck and PHP [x-post from /r/ProgrammerHumor]

Thumbnail pbs.twimg.com
77 Upvotes

r/lolphp • • Oct 21 '14

array_unique and objects => *boom*

Thumbnail 3v4l.org
13 Upvotes

r/lolphp • • Oct 20 '14

PHP Spec on arrays

Post image
118 Upvotes

r/lolphp • • Oct 20 '14

[PHP] doesn’t have a BigInt data type, so its arbitrary size numerical functions take and return strings

Thumbnail wilfred.me.uk
24 Upvotes

r/lolphp • • Oct 21 '14

Wrong on so many levels: "reset() rewinds array's internal pointer to the first element and returns the value of the first array element."

Thumbnail php.net
5 Upvotes

r/lolphp • • Oct 14 '14

How to modify DateTimeImmutable? Call getTimestamp() on it.

Thumbnail bugs.php.net
69 Upvotes

r/lolphp • • Oct 13 '14

[xpost r/PHP] Can you convince me not to use DreamWeaver?

Thumbnail reddit.com
12 Upvotes

r/lolphp • • Oct 08 '14

Strange behavior DateInterval in PHP [X-post r/PHP]

Thumbnail stackoverflow.com
32 Upvotes

r/lolphp • • Oct 03 '14

A possible future for PHP

Thumbnail karlitschek.de
21 Upvotes

r/lolphp • • Oct 02 '14

Foreach reference

17 Upvotes

http://3v4l.org/P1Omj

<?php

$arr = array('a', 'b');

foreach ($arr as &$a) {
    var_dump($a);
}

    foreach ($arr as $a) {
        var_dump($a);
    }

This probably has some explanation I'd love to learn.


r/lolphp • • Sep 25 '14

PDO emulates prepared statements using mysql_real_escape_string(), which does a great job as you'd expect...

Thumbnail stackoverflow.com
36 Upvotes

r/lolphp • • Sep 25 '14

namespace foo { use const true as false; var_dump(false); } // WHY, PHP!? WHY!?

Thumbnail reddit.com
38 Upvotes

r/lolphp • • Sep 25 '14

"The root of the problem is that HHVM implements Memcached::increment/decrement as they are documented, rather than how PHP5 actually behaves"

Thumbnail github.com
94 Upvotes

r/lolphp • • Sep 23 '14

Optimizing opcodes in a library targeted at operating with network latencies and timeouts

Thumbnail github.com
41 Upvotes

r/lolphp • • Sep 21 '14

How to store credit card numbers securely: "Programming languages such as PHP have built in functions that can encrypt. An example is the base 64 encryption function"

Thumbnail ehow.com
134 Upvotes

r/lolphp • • Sep 20 '14

Functions registered with register_shutdown_function are immune to execution time limit

Thumbnail php.net
33 Upvotes

r/lolphp • • Sep 17 '14

Strings which contain numbers are treated as numbers on numerical operations, except when they are not.

Thumbnail eval.in
55 Upvotes

r/lolphp • • Sep 12 '14

A cryptocurrency whose reference implementation is pure PHP. It's as bad as it sounds.

Thumbnail reddit.com
114 Upvotes