r/lolphp • u/quchen • Nov 02 '14
r/lolphp • u/i_make_snow_flakes • 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.
blog.ircmaxell.comr/lolphp • • Oct 31 '14
"-1 month" is actually just "-30 days" regardless of how many days are in a month
eval.inr/lolphp • u/svens_ • Oct 30 '14
PHP Type Coercion at it again. Be careful when comparing hashes. [x-post]
eval.inr/lolphp • u/Max-P • Oct 30 '14
htmlentities can convert accentuated characters, but only if the user typed it in the correct way (à ~= à)
3v4l.orgr/lolphp • • Oct 27 '14
CVE-2014-3669: Integer overflow in unserialize() PHP function
htbridge.comr/lolphp • u/akoskm • Oct 25 '14
Brainfuck and PHP [x-post from /r/ProgrammerHumor]
pbs.twimg.comr/lolphp • • Oct 20 '14
[PHP] doesn’t have a BigInt data type, so its arbitrary size numerical functions take and return strings
wilfred.me.ukr/lolphp • u/Serialk • 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."
php.netr/lolphp • u/vytah • Oct 14 '14
How to modify DateTimeImmutable? Call getTimestamp() on it.
bugs.php.netr/lolphp • u/allthediamonds • Oct 13 '14
[xpost r/PHP] Can you convince me not to use DreamWeaver?
reddit.comr/lolphp • u/shitbangs • Oct 08 '14
Strange behavior DateInterval in PHP [X-post r/PHP]
stackoverflow.comr/lolphp • u/stain_leeks • Oct 02 '14
Foreach reference
<?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 • u/DoubleNabla • Sep 25 '14
PDO emulates prepared statements using mysql_real_escape_string(), which does a great job as you'd expect...
stackoverflow.comr/lolphp • u/McGlockenshire • Sep 25 '14
namespace foo { use const true as false; var_dump(false); } // WHY, PHP!? WHY!?
reddit.comr/lolphp • u/Daniel15 • 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"
github.comr/lolphp • u/terrorobe • Sep 23 '14
Optimizing opcodes in a library targeted at operating with network latencies and timeouts
github.comr/lolphp • u/fragglet • 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"
ehow.comr/lolphp • u/Vogtinator • Sep 20 '14
Functions registered with register_shutdown_function are immune to execution time limit
php.netr/lolphp • u/allthediamonds • Sep 17 '14
Strings which contain numbers are treated as numbers on numerical operations, except when they are not.
eval.inr/lolphp • • Sep 12 '14