subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
lolphp
myaut
d3wmup1
<|soss|><|sot|>str_repeat returns NULL on failure<|eot|><|sost|>unlike pretty much everything else in PHP, which returns FALSE for failure, str_repeat returns NULL. also it's undocumented. <?php var_dump(str_repeat('fo',-1));?> >Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/Iu...
21
lolphp
Takeoded
d3wolbz
<|soss|><|sot|>str_repeat returns NULL on failure<|eot|><|sost|>unlike pretty much everything else in PHP, which returns FALSE for failure, str_repeat returns NULL. also it's undocumented. <?php var_dump(str_repeat('fo',-1));?> >Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/Iu...
16
lolphp
emilvikstrom
d3wmy7z
<|soss|><|sot|>str_repeat returns NULL on failure<|eot|><|sost|>unlike pretty much everything else in PHP, which returns FALSE for failure, str_repeat returns NULL. also it's undocumented. <?php var_dump(str_repeat('fo',-1));?> >Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/Iu...
10
lolphp
Takeoded
d3woext
<|soss|><|sot|>str_repeat returns NULL on failure<|eot|><|sost|>unlike pretty much everything else in PHP, which returns FALSE for failure, str_repeat returns NULL. also it's undocumented. <?php var_dump(str_repeat('fo',-1));?> >Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/Iu...
9
lolphp
bart2019
d3wnrhd
<|soss|><|sot|>str_repeat returns NULL on failure<|eot|><|sost|>unlike pretty much everything else in PHP, which returns FALSE for failure, str_repeat returns NULL. also it's undocumented. <?php var_dump(str_repeat('fo',-1));?> >Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/Iu...
6
lolphp
kephir
d3zgnky
<|soss|><|sot|>str_repeat returns NULL on failure<|eot|><|sost|>unlike pretty much everything else in PHP, which returns FALSE for failure, str_repeat returns NULL. also it's undocumented. <?php var_dump(str_repeat('fo',-1));?> >Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/Iu...
5
lolphp
vytah
2plab0
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|eols|><|endoftext|>
24
lolphp
pilif
cmydntz
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>The response in the bug report points out that the reporter is using a join parser that's different from what PHP ships by default. The reason behind this is that in some people's eyes, the original json decoder ...
28
lolphp
willglynn
cmxum5x
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>The Javascript Object Notation is correct in assuming that you were passing a (badly formatted) integer object. Python errors at characters 7-11 (the part that your example truncated). http://json.org/ shows th...
15
lolphp
m1ss1ontomars2k4
cmya07t
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>IP address parsing is also a good source of "lol C": $ ping 127.1 PING 127.1 (127.0.0.1): 56 data bytes $ ping 3232235777 PING 3232235777 (192.168.1.1): 56 data bytes $ ping 0300.0xa8.257 ...
14
lolphp
frezik
cmxwifw
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>The real lol here might be the [3v4l output](http://3v4l.org/dkcl5), showing different versions doing vastly different things. 5.2.0, 5.2.9 - 5.2.17 shows: NULL Fatal error: Call to undefined function jso...
12
lolphp
kashmill
cn03j22
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>The response in the bug report points out that the reporter is using a join parser that's different from what PHP ships by default. The reason behind this is that in some people's eyes, the original json decoder ...
9
lolphp
vsync
cmybcr5
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>IP address parsing is also a good source of "lol C": $ ping 127.1 PING 127.1 (127.0.0.1): 56 data bytes $ ping 3232235777 PING 3232235777 (192.168.1.1): 56 data bytes $ ping 0300.0xa8.257 ...
8
lolphp
pilif
cmykdfi
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>The response in the bug report points out that the reporter is using a join parser that's different from what PHP ships by default. The reason behind this is that in some people's eyes, the original json decoder ...
8
lolphp
m1ss1ontomars2k4
cmycxea
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>IP address parsing is also a good source of "lol C": $ ping 127.1 PING 127.1 (127.0.0.1): 56 data bytes $ ping 3232235777 PING 3232235777 (192.168.1.1): 56 data bytes $ ping 0300.0xa8.257 ...
7
lolphp
edwardly
cmybmqn
<|sols|><|sot|>IP addresses are valid JSON<|eot|><|sol|>https://bugs.php.net/bug.php?id=67923<|eol|><|sor|>The real lol here might be the [3v4l output](http://3v4l.org/dkcl5), showing different versions doing vastly different things. 5.2.0, 5.2.9 - 5.2.17 shows: NULL Fatal error: Call to undefined function jso...
6
lolphp
phillaf
1n9gg9
<|soss|><|sot|>Insightful documentation (xpost from /r/PHP)<|eot|><|sost|>Stumbled across this http://www.reddit.com/r/PHP/comments/1n93jz/insightful_documentation/ Edit: [for the lazy](http://www.php.net/manual/en/function.bson-decode.php)<|eost|><|eoss|><|endoftext|>
27
lolphp
nikic
ccglthv
<|soss|><|sot|>Insightful documentation (xpost from /r/PHP)<|eot|><|sost|>Stumbled across this http://www.reddit.com/r/PHP/comments/1n93jz/insightful_documentation/ Edit: [for the lazy](http://www.php.net/manual/en/function.bson-decode.php)<|eost|><|sor|>You have some serious indirection going on here. 1. *click* ht...
17
lolphp
suspiciously_calm
ccgl88m
<|soss|><|sot|>Insightful documentation (xpost from /r/PHP)<|eot|><|sost|>Stumbled across this http://www.reddit.com/r/PHP/comments/1n93jz/insightful_documentation/ Edit: [for the lazy](http://www.php.net/manual/en/function.bson-decode.php)<|eost|><|sor|>We are the 99%! Occupy PHP!<|eor|><|eoss|><|endoftext|>
12
lolphp
fragglet
xknsk
<|sols|><|sot|>Oldie but a goodie: a PHP integer vulnerability from several years ago.<|eot|><|sol|>http://use.perl.org/use.perl.org/_Aristotle/journal/33448.html<|eol|><|eols|><|endoftext|>
27
lolphp
chellomere
c6mwm7y
<|sols|><|sot|>Oldie but a goodie: a PHP integer vulnerability from several years ago.<|eot|><|sol|>http://use.perl.org/use.perl.org/_Aristotle/journal/33448.html<|eol|><|sor|>A further WTF is the needless use of calloc() in the first place: calloc(EXPR, sizeof(char)); sizeof(char) is always 1, so this is equival...
5
lolphp
redalastor
s9wtyw
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|eols|><|endoftext|>
23
lolphp
redalastor
htrpoge
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>This isn't that LOL, or unheard of. Lua also combines arrays and dictionaries into one data type. JavaScript too to some extent. It's a gotcha, but not really a design flaw per se.<|eor|><|soopr|>Read the ...
12
lolphp
Altreus
htq9gq7
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>Read the docs for json_decode https://www.php.net/manual/en/function.json-decode.php You can clearly see a optimal second param "associative" which allows you to keep your keys...<|eor|><|sor|>Great, the...
11
lolphp
jesseschalken
htqj63g
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>Why do people always refer to a stupidly inefficient polyfill for `array_is_list`? The correct polyfill is: ```php function array_is_list(array $array): bool { $i = 0; foreach ($array as $k => $v)...
10
lolphp
AyrA_ch
htqd6ac
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>> A list, sometimes also known as an array, is like the name suggests, a list of elements of any type. These elements are ordered, and every element has a numeric index, starting with 0. And after that th...
9
lolphp
funtek
htpu5jg
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>You're just learning the language? Everyone here knows this already<|eor|><|eols|><|endoftext|>
9
lolphp
redalastor
htprmgf
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>LOL a karma whore decided to jump a bandwagon with such a smoking hot stuff<|eor|><|soopr|>PHP developers are ridiculously thin skinned.<|eoopr|><|eols|><|endoftext|>
9
lolphp
tobiasvl
htrky5y
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>This isn't that LOL, or unheard of. Lua also combines arrays and dictionaries into one data type. JavaScript too to some extent. It's a gotcha, but not really a design flaw per se.<|eor|><|eols|><|endoftex...
7
lolphp
redalastor
htpt7xe
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>LOL a karma whore decided to jump a bandwagon with such a smoking hot stuff<|eor|><|soopr|>PHP developers are ridiculously thin skinned.<|eoopr|><|sor|>Karma whores are known for posting stuff they don't h...
7
lolphp
daperson1
htuezhh
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>Why do people always refer to a stupidly inefficient polyfill for `array_is_list`? The correct polyfill is: ```php function array_is_list(array $array): bool { $i = 0; foreach ($array as $k => $v)...
6
lolphp
jesseschalken
htr740r
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>Read the docs for json_decode https://www.php.net/manual/en/function.json-decode.php You can clearly see a optimal second param "associative" which allows you to keep your keys...<|eor|><|sor|>Im not sur...
6
lolphp
Takeoded
hum3z4d
<|sols|><|sot|>PHP: Frankenstein arrays<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>Why do people always refer to a stupidly inefficient polyfill for `array_is_list`? The correct polyfill is: ```php function array_is_list(array $array): bool { $i = 0; foreach ($array as $k => $v)...
5
lolphp
_pauseIt
cnn0if
<|soss|><|sot|>Unholy Trinity<|eot|><|sost|>&#x200B; https://preview.redd.it/gnmzztlop8f31.png?width=525&format=png&auto=webp&v=enabled&s=91dd6b124c4a917eabeb2e51e685907dd8fbb471<|eost|><|eoss|><|endoftext|>
26
lolphp
SerdanKK
ewcmzwu
<|soss|><|sot|>Unholy Trinity<|eot|><|sost|>&#x200B; https://preview.redd.it/gnmzztlop8f31.png?width=525&format=png&auto=webp&v=enabled&s=91dd6b124c4a917eabeb2e51e685907dd8fbb471<|eost|><|sor|>As much as I think PHP is garbage, nobody would disagree this is how it should work _if_ we were talking about how it works in...
15
lolphp
chierichetto
ewcehec
<|soss|><|sot|>Unholy Trinity<|eot|><|sost|>&#x200B; https://preview.redd.it/gnmzztlop8f31.png?width=525&format=png&auto=webp&v=enabled&s=91dd6b124c4a917eabeb2e51e685907dd8fbb471<|eost|><|sor|>Of course they won't be, and you would not want them to be either. But when casted to a boolean, they will evaluate as false. ...
10
lolphp
_pauseIt
ewc2rkp
<|soss|><|sot|>Unholy Trinity<|eot|><|sost|>&#x200B; https://preview.redd.it/gnmzztlop8f31.png?width=525&format=png&auto=webp&v=enabled&s=91dd6b124c4a917eabeb2e51e685907dd8fbb471<|eost|><|soopr|>Would love to see variations on this. What's the most absurd version you can find?<|eoopr|><|eoss|><|endoftext|>
7
lolphp
SerdanKK
ewcodhw
<|soss|><|sot|>Unholy Trinity<|eot|><|sost|>&#x200B; https://preview.redd.it/gnmzztlop8f31.png?width=525&format=png&auto=webp&v=enabled&s=91dd6b124c4a917eabeb2e51e685907dd8fbb471<|eost|><|sor|>I really really really hate to defend PHP, but falsy values are part of other languages too (javascript)<|eor|><|sor|>It's mea...
7
lolphp
redwall_hp
ewd0e5j
<|soss|><|sot|>Unholy Trinity<|eot|><|sost|>&#x200B; https://preview.redd.it/gnmzztlop8f31.png?width=525&format=png&auto=webp&v=enabled&s=91dd6b124c4a917eabeb2e51e685907dd8fbb471<|eost|><|sor|>I really really really hate to defend PHP, but falsy values are part of other languages too (javascript)<|eor|><|sor|>JavaScri...
6
lolphp
FlyLo11
ewde24e
<|soss|><|sot|>Unholy Trinity<|eot|><|sost|>&#x200B; https://preview.redd.it/gnmzztlop8f31.png?width=525&format=png&auto=webp&v=enabled&s=91dd6b124c4a917eabeb2e51e685907dd8fbb471<|eost|><|soopr|>Would love to see variations on this. What's the most absurd version you can find?<|eoopr|><|sor|>I'll just leave this here ...
5
lolphp
phplovesong
c4k7ld
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
25
lolphp
tdammers
erx4p6v
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
21
lolphp
shitcanz
erx6fut
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
13
lolphp
pease_pudding
ery61rx
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
7
lolphp
duskwuff
erzgfv5
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
7
lolphp
the_alias_of_andrea
erxyzka
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
6
lolphp
the_alias_of_andrea
eryrf9h
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
6
lolphp
the_alias_of_andrea
es6wwnj
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
6
lolphp
the_alias_of_andrea
es0q0by
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
6
lolphp
hillgod
erz2xma
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
5
lolphp
the_alias_of_andrea
es0py9o
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
5
lolphp
the_alias_of_andrea
es0prnd
<|soss|><|sot|>The state of PHP unicode in 2019<|eot|><|sost|>One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb\_ functions and at the same time try to keep your sanity in check. &#x200B; [https://www.php.net/manual/en/ref.mbstring.php](https://ww...
5
lolphp
TortoiseWrath
79iifz
<|soss|><|sot|>Checking the parameter order for file_put_contents when suddenly<|eot|><|sost|>> You can also specify the `data` parameter as a single dimension array. This is equivalent to `file_put_contents($filename, implode('', $array))`. why<|eost|><|eoss|><|endoftext|>
26
lolphp
squiggleslash
dp29o1l
<|soss|><|sot|>Checking the parameter order for file_put_contents when suddenly<|eot|><|sost|>> You can also specify the `data` parameter as a single dimension array. This is equivalent to `file_put_contents($filename, implode('', $array))`. why<|eost|><|sor|>I was going to say it makes sense for different operating ...
24
lolphp
TortoiseWrath
dp2gnaz
<|soss|><|sot|>Checking the parameter order for file_put_contents when suddenly<|eot|><|sost|>> You can also specify the `data` parameter as a single dimension array. This is equivalent to `file_put_contents($filename, implode('', $array))`. why<|eost|><|sor|>I was going to say it makes sense for different operating ...
19
lolphp
TortoiseWrath
dp29s5s
<|soss|><|sot|>Checking the parameter order for file_put_contents when suddenly<|eot|><|sost|>> You can also specify the `data` parameter as a single dimension array. This is equivalent to `file_put_contents($filename, implode('', $array))`. why<|eost|><|sor|>I was going to say it makes sense for different operating ...
18
lolphp
cfreak2399
dp3a5eg
<|soss|><|sot|>Checking the parameter order for file_put_contents when suddenly<|eot|><|sost|>> You can also specify the `data` parameter as a single dimension array. This is equivalent to `file_put_contents($filename, implode('', $array))`. why<|eost|><|sor|>I was going to say it makes sense for different operating ...
15
lolphp
Takeoded
dp3vfyq
<|soss|><|sot|>Checking the parameter order for file_put_contents when suddenly<|eot|><|sost|>> You can also specify the `data` parameter as a single dimension array. This is equivalent to `file_put_contents($filename, implode('', $array))`. why<|eost|><|sor|>well, the implode approach would make an entire concatenat...
7
lolphp
sourtin_
65wu9y
<|soss|><|sot|>Substituting variables in error messages...<|eot|><|sost|>So the webhost for a site I manage is upgrading their servers soon, distro, PHP version, etc, and to help their clients prepare they have setup a convenient test server. As the old server ran php5 and the new one php7, I expected some breaking cha...
26
lolphp
beerdude26
dgdymxv
<|soss|><|sot|>Substituting variables in error messages...<|eot|><|sost|>So the webhost for a site I manage is upgrading their servers soon, distro, PHP version, etc, and to help their clients prepare they have setup a convenient test server. As the old server ran php5 and the new one php7, I expected some breaking cha...
14
lolphp
prewk
dget1p3
<|soss|><|sot|>Substituting variables in error messages...<|eot|><|sost|>So the webhost for a site I manage is upgrading their servers soon, distro, PHP version, etc, and to help their clients prepare they have setup a convenient test server. As the old server ran php5 and the new one php7, I expected some breaking cha...
5
lolphp
sourtin_
dge1r0m
<|soss|><|sot|>Substituting variables in error messages...<|eot|><|sost|>So the webhost for a site I manage is upgrading their servers soon, distro, PHP version, etc, and to help their clients prepare they have setup a convenient test server. As the old server ran php5 and the new one php7, I expected some breaking cha...
5
lolphp
pease_pudding
dge5le6
<|soss|><|sot|>Substituting variables in error messages...<|eot|><|sost|>So the webhost for a site I manage is upgrading their servers soon, distro, PHP version, etc, and to help their clients prepare they have setup a convenient test server. As the old server ran php5 and the new one php7, I expected some breaking cha...
5
lolphp
element131
dgjcjvs
<|soss|><|sot|>Substituting variables in error messages...<|eot|><|sost|>So the webhost for a site I manage is upgrading their servers soon, distro, PHP version, etc, and to help their clients prepare they have setup a convenient test server. As the old server ran php5 and the new one php7, I expected some breaking cha...
5
lolphp
Tuxmascot
5gu22t
<|sols|><|sot|>RIPS - Roundcube 1.2.2: Command Execution via Email<|eot|><|sol|>https://blog.ripstech.com/2016/roundcube-command-execution-via-email/<|eol|><|eols|><|endoftext|>
27
lolphp
emilvikstrom
davqb08
<|sols|><|sot|>RIPS - Roundcube 1.2.2: Command Execution via Email<|eot|><|sol|>https://blog.ripstech.com/2016/roundcube-command-execution-via-email/<|eol|><|sor|>This is half PHP's fault, half developers'. Bad regex, not DRY, classic code injection vulnerability. The lol is that mail() doesn't provide a parameterized...
10
lolphp
credditz0rz
4lb2pi
<|sols|><|sot|>Iterate through UTF-8 string: preg_split is over 20 times faster than mb_substr<|eot|><|sol|>https://stackoverflow.com/questions/3666306/how-to-iterate-utf-8-string-in-php<|eol|><|eols|><|endoftext|>
25
lolphp
BreiteSeite
d3lwsc9
<|sols|><|sot|>Iterate through UTF-8 string: preg_split is over 20 times faster than mb_substr<|eot|><|sol|>https://stackoverflow.com/questions/3666306/how-to-iterate-utf-8-string-in-php<|eol|><|sor|>This benchmark is completely misleading as mb_substr() is (probably) called many times, increasing the overhead of the p...
11
lolphp
sarciszewski
44bc1v
<|sols|><|sot|>Anthony Ferrara on Twitter: "TIL: When you turn OFF prepared statement emulation for PDO+PostGreSQL, PDO rewrites the query anyway... https://t.co/bwkiOnACuL #HEADDESK"<|eot|><|sol|>https://twitter.com/ircmaxell/status/695276215897362432<|eol|><|eols|><|endoftext|>
27
lolphp
pilif
czpb398
<|sols|><|sot|>Anthony Ferrara on Twitter: "TIL: When you turn OFF prepared statement emulation for PDO+PostGreSQL, PDO rewrites the query anyway... https://t.co/bwkiOnACuL #HEADDESK"<|eot|><|sol|>https://twitter.com/ircmaxell/status/695276215897362432<|eol|><|sor|>Maybe I misunderstand, but unless PostgreSQL uses the ...
11
lolphp
the_alias_of_andrea
czp5z0l
<|sols|><|sot|>Anthony Ferrara on Twitter: "TIL: When you turn OFF prepared statement emulation for PDO+PostGreSQL, PDO rewrites the query anyway... https://t.co/bwkiOnACuL #HEADDESK"<|eot|><|sol|>https://twitter.com/ircmaxell/status/695276215897362432<|eol|><|sor|>Maybe I misunderstand, but unless PostgreSQL uses the ...
9
lolphp
fnzp
25b4k5
<|soss|><|sot|>exec returns string... wait... exec returns?<|eot|><|sost|>*Return Values: The last line from the result of the command.* [http://www.php.net/manual/en/function.exec.php] In C, shell, perl, and ruby, exec doesn't return. The calling process is overwritten. You would use system() if you want it to return...
27
lolphp
duskwuff
chfinj5
<|soss|><|sot|>exec returns string... wait... exec returns?<|eot|><|sost|>*Return Values: The last line from the result of the command.* [http://www.php.net/manual/en/function.exec.php] In C, shell, perl, and ruby, exec doesn't return. The calling process is overwritten. You would use system() if you want it to return...
21
lolphp
duskwuff
chfl5a8
<|soss|><|sot|>exec returns string... wait... exec returns?<|eot|><|sost|>*Return Values: The last line from the result of the command.* [http://www.php.net/manual/en/function.exec.php] In C, shell, perl, and ruby, exec doesn't return. The calling process is overwritten. You would use system() if you want it to return...
10
lolphp
Lokaltog
23vqcw
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|eols|><|endoftext|>
24
lolphp
catcradle5
ch182kx
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|sor|>To my knowledge this is an old leak posted some time in 2010. I don't think the site is currently running this code or anything like this code. For those who are wondering why this has become news: Yest...
26
lolphp
milordi
ch1z4j8
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|sor|> $salt = "LOLLOLOLOLOLOLOLOLOLOLOLOLOLOLOL"; #this is ONLY used if the host doesn't have openssl #I don't know a better way to get random data I just d...
23
lolphp
David_Crockett
ch1fy8t
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|sor|>To my knowledge this is an old leak posted some time in 2010. I don't think the site is currently running this code or anything like this code. For those who are wondering why this has become news: Yest...
17
lolphp
captainramen
ch12na9
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|sor|>Dat SQL injection<|eor|><|eols|><|endoftext|>
7
lolphp
kat5dotpostfix
ch1q6yq
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|sor|>To my knowledge this is an old leak posted some time in 2010. I don't think the site is currently running this code or anything like this code. For those who are wondering why this has become news: Yest...
6
lolphp
dochoncho
chb7ywg
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|sor|>I'm surprised the code wasn't formatted to make an ASCII representation of goatse<|eor|><|eols|><|endoftext|>
5
lolphp
gearvOsh
ch1ipfe
<|sols|><|sot|>4chan source code leak (x-post /r/programming)<|eot|><|sol|>http://pastebin.com/a45dp3Q1<|eol|><|sor|>Well 4chan is old, and was running old PHP4 code, so this was expected. The code base no longer looks like this.<|eor|><|eols|><|endoftext|>
5
lolphp
krinndnz
v8n4q
<|sols|><|sot|>An array that survives being overwritten<|eot|><|sol|>http://thedailywtf.com/Articles/Loose-Cat-Handling.aspx<|eol|><|eols|><|endoftext|>
26
lolphp
xnhy
c52cyzz
<|sols|><|sot|>An array that survives being overwritten<|eot|><|sol|>http://thedailywtf.com/Articles/Loose-Cat-Handling.aspx<|eol|><|sor|>> The one thing I can say for php, at least it isn't javascript. Now with html5 web devs are expected to make full scale web apps using js, a language that doesn't support file inclu...
9
lolphp
gatlin
c52b6ik
<|sols|><|sot|>An array that survives being overwritten<|eot|><|sol|>http://thedailywtf.com/Articles/Loose-Cat-Handling.aspx<|eol|><|sor|>> The one thing I can say for php, at least it isn't javascript. Now with html5 web devs are expected to make full scale web apps using js, a language that doesn't support file inclu...
7
lolphp
sandsmark
udnvg
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|eols|><|endoftext|>
25
lolphp
kouteiheika
c4uq8xe
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>> Tried my hand at C but pointers keep messing me up, even to this day. I have no idea why. Let me guess - because you are a terrible programmer?<|eor|><|eols|><|endoftext|>
43
lolphp
hyrulz
c4ul8ts
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>Which sentence tells me that the author is a little php fanboy and doesn't know shit about other programming languages? >Dynamic typing DING >It plain works DING DING >Best doc...
27
lolphp
dagbrown
c4ur6c9
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>> Tried my hand at C but pointers keep messing me up, even to this day. I have no idea why. Let me guess - because you are a terrible programmer?<|eor|><|sor|>That was the bit wh...
22
lolphp
StrangeWill
c4unmac
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>Which sentence tells me that the author is a little php fanboy and doesn't know shit about other programming languages? >Dynamic typing DING >It plain works DING DING >Best doc...
21
lolphp
duskwuff
c4umxtb
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>Which sentence tells me that the author is a little php fanboy and doesn't know shit about other programming languages? >Dynamic typing DING >It plain works DING DING >Best doc...
20
lolphp
workman161
c4ukkpf
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>> When it fails, it doesnt fail hard Granted, you can fail spectacularly with PHP, but it probably wont be PHPs fault. Because PHP cleans up and starts over for each request, one ...
17
lolphp
sloat
c4uhrx4
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>I honestly couldn't tell if the author was being sarcastic. Basically every point is contradictory to reality. I thought about doing a point-by-point refuting, but why bother? We al...
17
lolphp
xiongchiamiov
c4utyjg
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>> Tried my hand at C but pointers keep messing me up, even to this day. I have no idea why. Let me guess - because you are a terrible programmer?<|eor|><|sor|>When I saw that he ...
14
lolphp
InconsiderateBastard
c4uol6n
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>Which sentence tells me that the author is a little php fanboy and doesn't know shit about other programming languages? >Dynamic typing DING >It plain works DING DING >Best doc...
12
lolphp
BigRedS
c4usda6
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>Which sentence tells me that the author is a little php fanboy and doesn't know shit about other programming languages? >Dynamic typing DING >It plain works DING DING >Best doc...
11
lolphp
Syn3rgy
c50zlz3
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>I read this subreddit through a multi-reddit with r/programming and a bunch of others, and at first I thought this has been posted to r/programming and I was ready to downvote and m...
10
lolphp
xiongchiamiov
c4utxw3
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>Which sentence tells me that the author is a little php fanboy and doesn't know shit about other programming languages? >Dynamic typing DING >It plain works DING DING >Best doc...
10
lolphp
Rhomboid
c4uh2zv
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>I read this subreddit through a multi-reddit with r/programming and a bunch of others, and at first I thought this has been posted to r/programming and I was ready to downvote and m...
9
lolphp
workman161
c4uo6zr
<|sols|><|sot|>10 reasons to use PHP<|eot|><|sol|>http://www.eschrade.com/page/10-reasons-to-use-php-for-your-mobile-project/<|eol|><|sor|>> When it fails, it doesnt fail hard Granted, you can fail spectacularly with PHP, but it probably wont be PHPs fault. Because PHP cleans up and starts over for each request, one ...
9