subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
lolphp
simukis
rmaxq
<|sols|><|sot|>Float comparison<|eot|><|sol|>http://codepad.org/GJ7YoH0G<|eol|><|eols|><|endoftext|>
0
lolphp
Takeoded
ovp71b
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|eols|><|endoftext|>
0
lolphp
99999999977prime
h7ayjm2
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>You can never serialize internal classes, only user defined classes. There is no lol here. > Note: Note that many built-in PHP objects cannot be serialized. However, those with this ability either implement the[Serializable](http...
14
lolphp
chucker23n
h7ayukg
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>You can never serialize internal classes, only user defined classes. There is no lol here. > Note: Note that many built-in PHP objects cannot be serialized. However, those with this ability either implement the[Serializable](http...
14
lolphp
rbmichael
h7cd877
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>You can never serialize internal classes, only user defined classes. There is no lol here. > Note: Note that many built-in PHP objects cannot be serialized. However, those with this ability either implement the[Serializable](http...
11
lolphp
chucker23n
h7b04yx
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>You can never serialize internal classes, only user defined classes. There is no lol here. > Note: Note that many built-in PHP objects cannot be serialized. However, those with this ability either implement the[Serializable](http...
7
lolphp
GoTriggerYourself
h7fn6aj
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>You can never serialize internal classes, only user defined classes. There is no lol here. > Note: Note that many built-in PHP objects cannot be serialized. However, those with this ability either implement the[Serializable](http...
6
lolphp
chucker23n
h7bx73x
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>You can never serialize internal classes, only user defined classes. There is no lol here. > Note: Note that many built-in PHP objects cannot be serialized. However, those with this ability either implement the[Serializable](http...
6
lolphp
GoTriggerYourself
h7e7k84
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>You can never serialize internal classes, only user defined classes. There is no lol here. > Note: Note that many built-in PHP objects cannot be serialized. However, those with this ability either implement the[Serializable](http...
5
lolphp
chucker23n
h7bz1js
<|sols|><|sot|>DOMDocument + serialize()<|eot|><|sol|>https://3v4l.org/sCc8G<|eol|><|sor|>Knowing whether an object is built-in or user-defined is left as education for the developer.<|eor|><|sor|>So is knowing whether an API is safe to call, apparently. (No, asking devs to read the docs for every single function they ...
5
lolphp
phplovesong
b0yboc
<|soss|><|sot|>PHP: The array<|eot|><|sost|>PHP arrays are known to be bad. But having not used PHP in long time i recently was amazed how poorly they actually have built the array. Its basically a "all-things-fits" data structure. The best part is PHP will actually change the behaviour of the array depending on what i...
0
lolphp
colshrapnel
eihxvwl
<|soss|><|sot|>PHP: The array<|eot|><|sost|>PHP arrays are known to be bad. But having not used PHP in long time i recently was amazed how poorly they actually have built the array. Its basically a "all-things-fits" data structure. The best part is PHP will actually change the behaviour of the array depending on what i...
25
lolphp
jesseschalken
eii3bnl
<|soss|><|sot|>PHP: The array<|eot|><|sost|>PHP arrays are known to be bad. But having not used PHP in long time i recently was amazed how poorly they actually have built the array. Its basically a "all-things-fits" data structure. The best part is PHP will actually change the behaviour of the array depending on what i...
13
lolphp
jesseschalken
eii9gia
<|soss|><|sot|>PHP: The array<|eot|><|sost|>PHP arrays are known to be bad. But having not used PHP in long time i recently was amazed how poorly they actually have built the array. Its basically a "all-things-fits" data structure. The best part is PHP will actually change the behaviour of the array depending on what i...
13
lolphp
mawburn
eii2h5z
<|soss|><|sot|>PHP: The array<|eot|><|sost|>PHP arrays are known to be bad. But having not used PHP in long time i recently was amazed how poorly they actually have built the array. Its basically a "all-things-fits" data structure. The best part is PHP will actually change the behaviour of the array depending on what i...
11
lolphp
mr_ywg
eij0foz
<|soss|><|sot|>PHP: The array<|eot|><|sost|>PHP arrays are known to be bad. But having not used PHP in long time i recently was amazed how poorly they actually have built the array. Its basically a "all-things-fits" data structure. The best part is PHP will actually change the behaviour of the array depending on what i...
7
lolphp
dotancohen
eiq1u4n
<|soss|><|sot|>PHP: The array<|eot|><|sost|>PHP arrays are known to be bad. But having not used PHP in long time i recently was amazed how poorly they actually have built the array. Its basically a "all-things-fits" data structure. The best part is PHP will actually change the behaviour of the array depending on what i...
6
lolphp
Takeoded
6rpmq7
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|eols|><|endoftext|>
0
lolphp
muffe2k
dl73c5v
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|sor|>Although the wording is not the best, you can clearly see that the second argument is not optional with a quick look at the method signature. \_()...
20
lolphp
mikeputerbaugh
dl7dudi
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|sor|>[deleted]<|eor|><|soopr|>>PASSWORD_DEFAULT - Use the bcrypt algorithm **(default as of PHP 5.5.0).**<|eoopr|><|sor|>In PHP 5.5.0, the value of the ...
20
lolphp
deusex_
dl7ufxp
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|sor|>[deleted]<|eor|><|soopr|>>PASSWORD_DEFAULT - Use the bcrypt algorithm **(default as of PHP 5.5.0).**<|eoopr|><|sor|>In PHP 5.5.0, the value of the ...
18
lolphp
Saltub
dl7s3aw
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|sor|>The only thing I can find to laugh at is you, OP.<|eor|><|eols|><|endoftext|>
12
lolphp
danabrey
dl7hubx
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|sor|>Meh, more /r/lolphpuserdidntreadthedocsproperly<|eor|><|eols|><|endoftext|>
9
lolphp
nikic
dl7y6c7
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|sor|>Rationale for this design decision, in case it's not obvious: > By not having a default value (and hence being a mandatory argument), it forces im...
8
lolphp
djxfade
dlpj55b
<|sols|><|sot|>password_hash requires the 2nd argument, although it has a default value... wtf<|eot|><|sol|>http://php.net/manual/en/function.password-hash.php<|eol|><|sor|>Although the wording is not the best, you can clearly see that the second argument is not optional with a quick look at the method signature. \_()...
5
lolphp
00Davo
3hoikf
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|eols|><|endoftext|>
0
lolphp
SnowdogU77
cu96xv4
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|eols|><|endoftext|>
39
lolphp
BilgeXA
cu9ev90
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|eols|><|endoftext|>
26
lolphp
BilgeXA
cu9g6w1
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|soopr|>You're kidding, right? We're comparing an integer and a float. They're both numeric types; promoting those numbers to th...
24
lolphp
smog_alado
cu97s4e
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>Now that's a damn good question.<|eor|><|sor|>The most likely reason PHP's ceil returns floats is because that is what the ceil function in the C l...
23
lolphp
barubary
cu9cgev
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>Now that's a damn good question.<|eor|><|sor|>The most likely reason PHP's ceil returns floats is because that is what the ceil function in the C l...
22
lolphp
the_biz
cu9wyv9
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>It's just more convenient to keep on working on floats when you do stuff with floats. Why should it change data type, just because you ask it to r...
17
lolphp
madsohm
cu98pik
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>It's just more convenient to keep on working on floats when you do stuff with floats. Why should it change data type, just because you ask it to r...
12
lolphp
BilgeXA
cu9gi1u
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|soopr|>You're kidding, right? We're comparing an integer and a float. They're both numeric types; promoting those numbers to th...
11
lolphp
Carlos_Sagan
cu97ad8
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|eols|><|endoftext|>
10
lolphp
xiata
cu9m2lb
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|soopr|>You're kidding, right? We're comparing an integer and a float. They're both numeric types; promoting those numbers to th...
10
lolphp
the_biz
cuegr8g
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>It's just more convenient to keep on working on floats when you do stuff with floats. Why should it change data type, just because you ask it to r...
9
lolphp
00Davo
cu9y6hh
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|soopr|>You're kidding, right? We're comparing an integer and a float. They're both numeric types; promoting those numbers to th...
8
lolphp
coredumperror
cuei9yv
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>It's just more convenient to keep on working on floats when you do stuff with floats. Why should it change data type, just because you ask it to r...
8
lolphp
josefx
cuide43
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>It's just more convenient to keep on working on floats when you do stuff with floats. Why should it change data type, just because you ask it to r...
7
lolphp
josefx
cuidiex
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|sor|>In Javascript, the OP's perfectly reasonable assumption holds: < 0 === Math.ceil(0) > true The only LOL Here is ...
6
lolphp
smog_alado
cua37mi
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>That would be because ceil returns a float. 0.0 === ceil(0)<|eor|><|sor|>But why?<|eor|><|sor|>Now that's a damn good question.<|eor|><|sor|>The most likely reason PHP's ceil returns floats is because that is what the ceil function in the C l...
6
lolphp
marishtar
cua1lg4
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|soopr|>You're kidding, right? We're comparing an integer and a float. They're both numeric types; promoting those numbers to th...
6
lolphp
poizan42
cubtd8a
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>The only *lol* here is your lack of understanding of basic programming fundamentals, namely: *data types*.<|eor|><|sor|>I laugh at PHP having different data types for numbers. Really, it's hilarious. A language that at one side tries to do a...
5
lolphp
diarrhea_on_rye
cutppav
<|sols|><|sot|>0 !== ceil(0)<|eot|><|sol|>https://3v4l.org/HD5HD<|eol|><|sor|>Did you actually read the documentation of ceil()? Do you also wonder why 0 === 0.0 evaluates to false? Welcome in the land of floating point arithmetic.<|eor|><|soopr|>Floating point arithmetic isn't the problem - an IEEE 754 float 0.0 compa...
5
lolphp
Serialk
2oek8k
<|sols|><|sot|>The PHP way of creating a directory without race conditions<|eot|><|sol|>http://stackoverflow.com/questions/19964287/mkdir-function-throw-exception-file-exists-even-after-checking-that-directory/25219407#25219407<|eol|><|eols|><|endoftext|>
0
lolphp
suspiciously_calm
cmmhoab
<|sols|><|sot|>The PHP way of creating a directory without race conditions<|eot|><|sol|>http://stackoverflow.com/questions/19964287/mkdir-function-throw-exception-file-exists-even-after-checking-that-directory/25219407#25219407<|eol|><|sor|>This is a lolposix. I wouldn't know how to code around that in Posix either, ot...
11
lolphp
Innominate8
cmmo5vy
<|sols|><|sot|>The PHP way of creating a directory without race conditions<|eot|><|sol|>http://stackoverflow.com/questions/19964287/mkdir-function-throw-exception-file-exists-even-after-checking-that-directory/25219407#25219407<|eol|><|sor|>This is a lolposix. I wouldn't know how to code around that in Posix either, ot...
7
lolphp
ElusiveGuy
cmmnf1a
<|sols|><|sot|>The PHP way of creating a directory without race conditions<|eot|><|sol|>http://stackoverflow.com/questions/19964287/mkdir-function-throw-exception-file-exists-even-after-checking-that-directory/25219407#25219407<|eol|><|sor|>This is a lolposix. I wouldn't know how to code around that in Posix either, ot...
5
lolphp
sloat
2j63fo
<|soss|><|sot|>Parts of the standard library are optional<|eot|><|sost|>Earlier today, I had to recompile core PHP (via Homebrew) in order to the the imap functions working. I would understand if it was an extension, but this is their standard library. It should not be optional. Is there any rationalization for doing ...
0
lolphp
Altreus
2fzp4m
<|sols|><|sot|>Function deprecated in 5.5.0 has been throwing E_DEPRECATED since 5.3.0<|eot|><|sol|>http://uk1.php.net/manual/en/function.mysql-db-query.php<|eol|><|eols|><|endoftext|>
0
lolphp
TimeToogo
cke92jg
<|sols|><|sot|>Function deprecated in 5.5.0 has been throwing E_DEPRECATED since 5.3.0<|eot|><|sol|>http://uk1.php.net/manual/en/function.mysql-db-query.php<|eol|><|sor|>Actually the entire mysql **extension** was deprecated as of 5.5.0 The linked function is correctly documented to have been deprecated in 5.3 if you r...
6
lolphp
yousai
2ednxn
<|sols|><|sot|>Gotta love php.ini defaults!<|eot|><|sol|>http://i.imgur.com/vPAPK0v.png<|eol|><|eols|><|endoftext|>
0
lolphp
DCoder1337
cjyhku4
<|sols|><|sot|>Gotta love php.ini defaults!<|eot|><|sol|>http://i.imgur.com/vPAPK0v.png<|eol|><|sor|>There are two default ini files - `php.ini-development` and `php.ini-production`. `display_errors` defaults to `Off` in the production one, and [has been that way since its introduction in 2009](https://github.com/php/p...
12
lolphp
gu3st12
cjyslig
<|sols|><|sot|>Gotta love php.ini defaults!<|eot|><|sol|>http://i.imgur.com/vPAPK0v.png<|eol|><|sor|>I think there needs to be a flair for posts that say "loldev" instead. Most of the stupid shit I see posts are from devs who don't know what they're doing, not a fault with PHP. But of course, the PHP haters will leec...
6
lolphp
Jonno_FTW
1ybbdv
<|sols|><|sot|>Useful PHP Templating Feature in your IDE Plugin? Yeah lets remove it for no reason<|eot|><|sol|>https://bugs.eclipse.org/bugs/show_bug.cgi?id=318164<|eol|><|eols|><|endoftext|>
0
lolphp
ajmarks
cfj55hm
<|sols|><|sot|>Useful PHP Templating Feature in your IDE Plugin? Yeah lets remove it for no reason<|eot|><|sol|>https://bugs.eclipse.org/bugs/show_bug.cgi?id=318164<|eol|><|sor|>Where's the lulz?<|eor|><|eols|><|endoftext|>
6
lolphp
djsumdog
1my1ix
<|sols|><|sot|>DateTimes are interpreted as mm/dd/yyyy unless you use hyphens, then it assumes you're European and uses dd/mm/yyyy<|eot|><|sol|>https://twitter.com/serenecloud/status/381986015159648256<|eol|><|eols|><|endoftext|>
0
lolphp
shitcanz
e9476a
<|sols|><|sot|>catch requires an annotation for consistency<|eot|><|sol|>https://repl.it/repls/StupendousLastMemory<|eol|><|eols|><|endoftext|>
0
lolphp
bopp
fagf53j
<|sols|><|sot|>catch requires an annotation for consistency<|eot|><|sol|>https://repl.it/repls/StupendousLastMemory<|eol|><|sor|>I don't see how `catch` would make sense, if you don't specify _what_ it needs to catch. <|eor|><|eols|><|endoftext|>
9
lolphp
duskwuff
fagfwyx
<|sols|><|sot|>catch requires an annotation for consistency<|eot|><|sol|>https://repl.it/repls/StupendousLastMemory<|eol|><|soopr|>Basically you must annotate each catch with a Exception type. But all other PHP constructs are dynamic.<|eoopr|><|sor|>The type name isn't just a type declaration; it controls which excepti...
8
lolphp
Cranio76
fagl82d
<|sols|><|sot|>catch requires an annotation for consistency<|eot|><|sol|>https://repl.it/repls/StupendousLastMemory<|eol|><|sor|>It's not a bug, it's a feature. And it's not an annotation, it's a type hint which is a fundamental part of the construct. Plus, if you want general catch-all, you can catch `\Exception` or ...
6
lolphp
Mark_Messa
dlqui9
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
0
lolphp
SixFootJockey
f4tlzq3
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
15
lolphp
ranisalt
f4trlia
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
12
lolphp
SixFootJockey
f4tmqzt
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
11
lolphp
Max-P
f4tr7z7
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
10
lolphp
AyrA_ch
f4uj19w
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
8
lolphp
SixFootJockey
f4tp6qx
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
7
lolphp
SixFootJockey
f4tsbgh
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
6
lolphp
weirdasianfaces
f4tvxlf
<|soss|><|sot|>PHP Session: ID generated server side only?<|eot|><|sost|>Consider the following PHP script: <?php session_start(); echo session_id(); When you open this page via browser, you should see the session ID **generated by the server.** For a standard php.ini setup, this session ID might be 32 ...
6
lolphp
MMauro94
66vj72
<|sols|><|sot|>Having bare URLs in code doesn't give a compile error<|eot|><|sol|>https://3v4l.org/1jpiY<|eol|><|eols|><|endoftext|>
0
lolphp
Rhomboid
dgllm0w
<|sols|><|sot|>Having bare URLs in code doesn't give a compile error<|eot|><|sol|>https://3v4l.org/1jpiY<|eol|><|sor|>That's not a lolphp. `//` starts a comment, so everything from there on is ignored. An identifier ending in a colon is a label (a possible target for `goto`.) So it's perfectly valid code. This is n...
34
lolphp
sproingie
dglvj0g
<|sols|><|sot|>Having bare URLs in code doesn't give a compile error<|eot|><|sol|>https://3v4l.org/1jpiY<|eol|><|sor|>That's not a lolphp. `//` starts a comment, so everything from there on is ignored. An identifier ending in a colon is a label (a possible target for `goto`.) So it's perfectly valid code. This is n...
5
lolphp
TheOnlyMrYeah
2yfjei
<|sols|><|sot|>Object properties which are only accessible via foreach (x-post from /r/shittyprogramming)<|eot|><|sol|>http://np.reddit.com/r/shittyprogramming/comments/2yfhc2/php_objectproperties_that_are_only_accessible_via/<|eol|><|eols|><|endoftext|>
0
lolphp
myaut
cp934px
<|sols|><|sot|>Object properties which are only accessible via foreach (x-post from /r/shittyprogramming)<|eot|><|sol|>http://np.reddit.com/r/shittyprogramming/comments/2yfhc2/php_objectproperties_that_are_only_accessible_via/<|eol|><|sor|>That's because in dynamic languages objects are usually implemented as hashes/di...
9
lolphp
cite-reader
cp9p685
<|sols|><|sot|>Object properties which are only accessible via foreach (x-post from /r/shittyprogramming)<|eot|><|sol|>http://np.reddit.com/r/shittyprogramming/comments/2yfhc2/php_objectproperties_that_are_only_accessible_via/<|eol|><|sor|>You buried the lead! Go [one step further](http://codepad.org/bT0awVpM) and make...
5
lolphp
aaptel
2c8z21
<|sols|><|sot|>No way to insert multiple rows at the same time, building huge query string instead.<|eot|><|sol|>http://stackoverflow.com/a/9088630/151617<|eol|><|eols|><|endoftext|>
0
lolphp
xiongchiamiov
cjd4afi
<|sols|><|sot|>No way to insert multiple rows at the same time, building huge query string instead.<|eot|><|sol|>http://stackoverflow.com/a/9088630/151617<|eol|><|soopr|>> While the overall query itself took milliseconds or less, the latter (single string) query was consistently 8 times faster or more. If this was buil...
5
lolphp
tdammers
cjd5b15
<|sols|><|sot|>No way to insert multiple rows at the same time, building huge query string instead.<|eot|><|sol|>http://stackoverflow.com/a/9088630/151617<|eol|><|soopr|>> While the overall query itself took milliseconds or less, the latter (single string) query was consistently 8 times faster or more. If this was buil...
5
lolphp
supremecommand3r
26auoy
<|soss|><|sot|>This place is scary<|eot|><|sost|>None of you have usernames, creeping me out http://imgur.com/jDVrpb3<|eost|><|eoss|><|endoftext|>
0
lolphp
ajmarks
chpblv3
<|soss|><|sot|>This place is scary<|eot|><|sost|>None of you have usernames, creeping me out http://imgur.com/jDVrpb3<|eost|><|sor|>Mobile helps... Or just go into the CSS and disable the `display:none` part for nicknames <|eor|><|sor|>Or just untick "Use subreddit style."<|eor|><|soopr|>Why is it like this? <|eoopr...
5
lolphp
kenbw2
1ypgpb
<|soss|><|sot|>string(3) " "<|eot|><|sost|>Defeated by a sign<|eost|><|eoss|><|endoftext|>
0
lolphp
tdammers
cfmkm64
<|soss|><|sot|>string(3) " "<|eot|><|sost|>Defeated by a sign<|eost|><|sor|>Well, duh. PHP doesn't have a string type. It has a byte array type which, for weird reasons, ended up being called "string" in PHP. As long as you respect this, it will (mostly) work as "designed". The "manual" and the "documentation" also ca...
13
lolphp
ajmarks
cfmkk9g
<|soss|><|sot|>string(3) " "<|eot|><|sost|>Defeated by a sign<|eost|><|sor|>Explanation?<|eor|><|eoss|><|endoftext|>
10
lolphp
deadman87
9tynx6
<|sols|><|sot|>Magento got jokes<|eot|><|sol|>https://imgflip.com/i/2lnnyj<|eol|><|eols|><|endoftext|>
0
lolphp
DCoder1337
e90pu28
<|sols|><|sot|>Magento got jokes<|eot|><|sol|>https://imgflip.com/i/2lnnyj<|eol|><|sor|>This is not really /r/lolphp material, more like /r/ProgrammingHorror . That said, *all of Magento* qualifies as one big joke. For example: * [Undefined classes, methods, and fields, oh my!](https://imgur.com/RMxWEgR) * [You said ...
21
lolphp
galaktos
e91657p
<|sols|><|sot|>Magento got jokes<|eot|><|sol|>https://imgflip.com/i/2lnnyj<|eol|><|sor|>This is not really /r/lolphp material, more like /r/ProgrammingHorror . That said, *all of Magento* qualifies as one big joke. For example: * [Undefined classes, methods, and fields, oh my!](https://imgur.com/RMxWEgR) * [You said ...
16
lolphp
dividebyzero14
e90eajm
<|sols|><|sot|>Magento got jokes<|eot|><|sol|>https://imgflip.com/i/2lnnyj<|eol|><|soopr|>It's XML hell<|eoopr|><|sor|>Hey, to be fair, you're eliminating boilerplate code. The replacement is boilerplate *markup*<|eor|><|eols|><|endoftext|>
9
lolphp
redwall_hp
e91j8w9
<|sols|><|sot|>Magento got jokes<|eot|><|sol|>https://imgflip.com/i/2lnnyj<|eol|><|sor|>This is not really /r/lolphp material, more like /r/ProgrammingHorror . That said, *all of Magento* qualifies as one big joke. For example: * [Undefined classes, methods, and fields, oh my!](https://imgur.com/RMxWEgR) * [You said ...
5
lolphp
nowimpissed
31j03g
<|sols|><|sot|>Heredocs & semicolons<|eot|><|sol|>http://ca3.php.net/manual/en/language.types.string.php#107138<|eol|><|eols|><|endoftext|>
0
lolphp
philipwhiuk
cq282ay
<|sols|><|sot|>Heredocs & semicolons<|eot|><|sol|>http://ca3.php.net/manual/en/language.types.string.php#107138<|eol|><|sor|>Nope, I think that's reasonable behaviour. A ; ends a statement, a heredoc is not a statement, it's an expression. You can't do `2+3;` either<|eor|><|eols|><|endoftext|>
18
lolphp
vytah
cq2cvud
<|sols|><|sot|>Heredocs & semicolons<|eot|><|sol|>http://ca3.php.net/manual/en/language.types.string.php#107138<|eol|><|sor|>Nope, I think that's reasonable behaviour. A ; ends a statement, a heredoc is not a statement, it's an expression. You can't do `2+3;` either<|eor|><|sor|>I agree, all of it makes sense: you ...
6
lolphp
philipwhiuk
cq284ds
<|sols|><|sot|>Heredocs & semicolons<|eot|><|sol|>http://ca3.php.net/manual/en/language.types.string.php#107138<|eol|><|sor|>I would gag if I inherited code that was passing heredoc strings into functions like this. It kind of makes sense, as you can't go `foo($str = 'abcd';);` but obviously `$str = 'abcd';` is fine a...
6
lolphp
nowimpissed
cq2c0jx
<|sols|><|sot|>Heredocs & semicolons<|eot|><|sol|>http://ca3.php.net/manual/en/language.types.string.php#107138<|eol|><|sor|>More bizarre is how PHP's heredoc syntax has somehow sprouted an extra `<`. PHP uses three. Every other language with heredocs (sh, Perl, Ruby, Racket) uses two.<|eor|><|soopr|>Well, bash (since ...
6
lolphp
myhf
1y4wds
<|sols|><|sot|>List possible changes, updates, additions for php6<|eot|><|sol|>https://wiki.php.net/ideas/php6<|eol|><|eols|><|endoftext|>
0
lolphp
elcapitanoooo
qo23yc
<|soss|><|sot|>Get class: Just a lol<|eot|><|sost|>Consider this example: class A { } class Foo { public static function bar($x) { echo get_class($x), "\n"; } } Foo::bar(new A()); Foo::bar(null); Its just broken.<|eost|><|eoss|><|endoftext|>
0
lolphp
sproingie
hjk3wst
<|soss|><|sot|>Get class: Just a lol<|eot|><|sost|>Consider this example: class A { } class Foo { public static function bar($x) { echo get_class($x), "\n"; } } Foo::bar(new A()); Foo::bar(null); Its just broken.<|eost|><|sor|>https://3v4l.org/5Epdj ENOLOL ... other than that OP can't seem to write fu...
13
lolphp
sproingie
hjk72ir
<|soss|><|sot|>Get class: Just a lol<|eot|><|sost|>Consider this example: class A { } class Foo { public static function bar($x) { echo get_class($x), "\n"; } } Foo::bar(new A()); Foo::bar(null); Its just broken.<|eost|><|sor|>https://3v4l.org/5Epdj ENOLOL ... other than that OP can't seem to write fu...
8
lolphp
sproingie
hjkg0vv
<|soss|><|sot|>Get class: Just a lol<|eot|><|sost|>Consider this example: class A { } class Foo { public static function bar($x) { echo get_class($x), "\n"; } } Foo::bar(new A()); Foo::bar(null); Its just broken.<|eost|><|sor|>https://3v4l.org/5Epdj ENOLOL ... other than that OP can't seem to write fu...
6