subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
loljs | adisbladis | cjm4gh1 | <|soss|><|sot|>Hold your horses! ['10','10','10','10'].map(parseInt) yields [10, NaN, 2, 3]<|eot|><|sost|><|eost|><|sor|>This isn't actually loljs:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
The Array.map callback takes three params:
(value, index, array)
Therefore ['10... | 6 |
loljs | cjwelborn | cjsg2t1 | <|soss|><|sot|>Hold your horses! ['10','10','10','10'].map(parseInt) yields [10, NaN, 2, 3]<|eot|><|sost|><|eost|><|sor|>This isn't actually loljs:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
The Array.map callback takes three params:
(value, index, array)
Therefore ['10... | 6 |
loljs | waiting4op2deliver | rzbg6j | <|soss|><|sot|>typeof '' === String<|eot|><|sost|>'string' was what I was looking for...<|eost|><|eoss|><|endoftext|> | 0 |
loljs | igorim | 4crbd1 | <|soss|><|sot|>Math.wtf<|eot|><|sost|>Math.max()
-Infinity
Math.min()
Infinity
Shouldn't that be reverse? <|eost|><|eoss|><|endoftext|> | 0 |
loljs | BaloneyGeek | 4ca7if | <|soss|><|sot|>When is not a number a number?<|eot|><|sost|> $: node
> typeof(NaN)
'number'
><|eost|><|eoss|><|endoftext|> | 0 |
loljs | mort96 | d1gs8jy | <|soss|><|sot|>When is not a number a number?<|eot|><|sost|> $: node
> typeof(NaN)
'number'
><|eost|><|sor|>javascript's number type is a floating point number. NaN is defined by the floating point spec, and is a valid floating point number.<|eor|><|eoss|><|endoftext|> | 11 |
loljs | sethnis | 30tvl7 | <|soss|><|sot|>console.log(.1 + .2)<|eot|><|sost|> > console.log(.1 + .2);
0.30000000000000004
Yes, I know it is due to floating point precision. It's still funny.
<|eost|><|eoss|><|endoftext|> | 0 |
loljs | pxpxy | cpvvylw | <|soss|><|sot|>console.log(.1 + .2)<|eot|><|sost|> > console.log(.1 + .2);
0.30000000000000004
Yes, I know it is due to floating point precision. It's still funny.
<|eost|><|sor|>As much as I hate Js, that's more a "lol programming" thing. Ruby, Python and Java will all give you the exact same result <|eor... | 8 |
loljs | cjwelborn | cpvxj60 | <|soss|><|sot|>console.log(.1 + .2)<|eot|><|sost|> > console.log(.1 + .2);
0.30000000000000004
Yes, I know it is due to floating point precision. It's still funny.
<|eost|><|sor|>As much as I hate Js, that's more a "lol programming" thing. Ruby, Python and Java will all give you the exact same result <|eor... | 5 |
lolphp | callcifer | 3eaw98 | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|eols|><|endoftext|> | 381 |
lolphp | SirClueless | ctdifqp | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>The problem is way worse than you think. Check out what this looks like when printed in hexadecimal: http://3v4l.org/XVTgS
Basically, what is going on is that PHP_INT_MAX is 2^63 - 1. mt_getrandmax() is 2^... | 349 |
lolphp | polish_niceguy | ctd7z8d | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>[I think I know who coded that part](http://i.imgur.com/SbK9oWd.png)<|eor|><|eols|><|endoftext|> | 117 |
lolphp | callcifer | ctd61r5 | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>what the fuck. How do people even find this<|eor|><|soopr|>We just found out about this at work. We were using `mt_rand(1, PHP_INT_MAX)` to generate non-mission-critical numeric identifiers and someone real... | 91 |
lolphp | andreasbeer1981 | cteduc8 | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>well, that's odd...<|eor|><|eols|><|endoftext|> | 83 |
lolphp | callcifer | ctdixmh | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>The problem is way worse than you think. Check out what this looks like when printed in hexadecimal: http://3v4l.org/XVTgS
Basically, what is going on is that PHP_INT_MAX is 2^63 - 1. mt_getrandmax() is 2^... | 66 |
lolphp | kinsi55 | ctd60q6 | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>what the fuck. How do people even find this<|eor|><|eols|><|endoftext|> | 52 |
lolphp | heyf00L | ctel63q | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>well, that's odd...<|eor|><|sor|>Dude, that comment, I can't even....<|eor|><|sor|>Can we get a mod 2 remove these comments?<|eor|><|eols|><|endoftext|> | 49 |
lolphp | kinsi55 | ctd651l | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>what the fuck. How do people even find this<|eor|><|soopr|>We just found out about this at work. We were using `mt_rand(1, PHP_INT_MAX)` to generate non-mission-critical numeric identifiers and someone real... | 46 |
lolphp | antihexe | ctegfqm | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>The problem is way worse than you think. Check out what this looks like when printed in hexadecimal: http://3v4l.org/XVTgS
Basically, what is going on is that PHP_INT_MAX is 2^63 - 1. mt_getrandmax() is 2^... | 45 |
lolphp | TaohRihze | ctefho7 | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>well, that's odd...<|eor|><|sor|>Dude, that comment, I can't even....<|eor|><|eols|><|endoftext|> | 44 |
lolphp | nikic | ctdkk1c | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>The problem is way worse than you think. Check out what this looks like when printed in hexadecimal: http://3v4l.org/XVTgS
Basically, what is going on is that PHP_INT_MAX is 2^63 - 1. mt_getrandmax() is 2^... | 44 |
lolphp | polish_niceguy | ctdfewi | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>[deleted]<|eor|><|soopr|>It used to be 100% biased towards [even numbers](https://bugs.php.net/bug.php?id=55519), so something somewhere got changed but it's not any better.<|eoopr|><|sor|>* add 1 to the re... | 42 |
lolphp | callcifer | ctd672y | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>what the fuck. How do people even find this<|eor|><|soopr|>We just found out about this at work. We were using `mt_rand(1, PHP_INT_MAX)` to generate non-mission-critical numeric identifiers and someone real... | 40 |
lolphp | NeatG | ctdbjxr | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>what the fuck. How do people even find this<|eor|><|soopr|>We just found out about this at work. We were using `mt_rand(1, PHP_INT_MAX)` to generate non-mission-critical numeric identifiers and someone real... | 39 |
lolphp | tomkul | cteew6y | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>Linux (PHP 5.5.9-1ubuntu4.11):
for ($i = 0; $i<10000000; $i++) {echo mt_rand(1, PHP_INT_MAX)%2==0?'even':'';}
Not even one even!
Windows:
for ($i = 0; $i<10000; $i++) {echo mt_rand(1,... | 38 |
lolphp | amphetamachine | ctdbpb4 | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>[deleted]<|eor|><|sor|>It's documented, so [it can never change](https://xkcd.com/1172/). It's the PHP way.<|eor|><|eols|><|endoftext|> | 38 |
lolphp | callcifer | ctdejst | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>what the fuck. How do people even find this<|eor|><|soopr|>We just found out about this at work. We were using `mt_rand(1, PHP_INT_MAX)` to generate non-mission-critical numeric identifiers and someone real... | 28 |
lolphp | tuananh_org | ctenc1h | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>PHP's logic: it's weird but it's documented, therefore it's not a bug.<|eor|><|eols|><|endoftext|> | 27 |
lolphp | PmMeYourPerkyBCups | cteqhl4 | <|sols|><|sot|>mt_rand(1, PHP_INT_MAX) only generates odd numbers<|eot|><|sol|>http://3v4l.org/dMbat<|eol|><|sor|>[deleted]<|eor|><|sor|>mt_rand(1, PHP_INT_MAX) + mt_rand(0,1);<|eor|><|eols|><|endoftext|> | 27 |
lolphp | phplovesong | mdkvzl | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|eols|><|endoftext|> | 327 |
lolphp | AyrA_ch | gs9ywjg | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>String splitting is really confusing in PHP though:
- **split**: This splits a string but the delimiter argument is treated as a regex (deprecated and removed)
- **str_split**: Splits a string into an... | 84 |
lolphp | Regimardyl | gsafb5u | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>In the very, very first versions of PHP, the function lookup hash table used `strlen` as the hash function. The decision to name it `explode` instead of `split` therefore was for performance reasons, a... | 46 |
lolphp | sproingie | gsais1a | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>In the very, very first versions of PHP, the function lookup hash table used `strlen` as the hash function. The decision to name it `explode` instead of `split` therefore was for performance reasons, a... | 41 |
lolphp | tobiasvl | gsc1k2a | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>In the very, very first versions of PHP, the function lookup hash table used `strlen` as the hash function. The decision to name it `explode` instead of `split` therefore was for performance reasons, a... | 39 |
lolphp | AyrA_ch | gsa7w44 | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>String splitting is really confusing in PHP though:
- **split**: This splits a string but the delimiter argument is treated as a regex (deprecated and removed)
- **str_split**: Splits a string into an... | 21 |
lolphp | I_LICK_ROBOTS | gsag35j | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>In the very, very first versions of PHP, the function lookup hash table used `strlen` as the hash function. The decision to name it `explode` instead of `split` therefore was for performance reasons, a... | 19 |
lolphp | colshrapnel | gs9ymva | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>Memes about PHP's quirks
Memes about PHP design flaws
Memes when you just hate the language but have no idea what to make a meme about.<|eor|><|eols|><|endoftext|> | 18 |
lolphp | sproingie | gsosl2a | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>In the very, very first versions of PHP, the function lookup hash table used `strlen` as the hash function. The decision to name it `explode` instead of `split` therefore was for performance reasons, a... | 7 |
lolphp | sproingie | gsamy5f | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>In the very, very first versions of PHP, the function lookup hash table used `strlen` as the hash function. The decision to name it `explode` instead of `split` therefore was for performance reasons, a... | 5 |
lolphp | barubary | gsoqiym | <|sols|><|sot|>PHP: When naming is thrown out the window<|eot|><|sol|>https://i.redd.it/58agcyondcp61.jpg<|eol|><|sor|>In the very, very first versions of PHP, the function lookup hash table used `strlen` as the hash function. The decision to name it `explode` instead of `split` therefore was for performance reasons, a... | 5 |
lolphp | ThisIsADogHello | 4em0f9 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|eols|><|endoftext|> | 279 |
lolphp | Regimardyl | d21arka | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 77 |
lolphp | squiggleslash | d221bs1 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>Someone somewhere is looking at this function and thinking to themselves "Hmm, so ... | 48 |
lolphp | masklinn | d21dsd7 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 43 |
lolphp | midir | d225kvx | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 24 |
lolphp | coredumperror | d21kfs2 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 22 |
lolphp | Drainedsoul | d21od5t | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 21 |
lolphp | z500 | d21e6h1 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 20 |
lolphp | Regimardyl | d21rk2l | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 17 |
lolphp | z500 | d21owqf | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 15 |
lolphp | poizan42 | d26nhnz | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 14 |
lolphp | mort96 | d21s655 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>They could've at least made it "1337".<|eor|><|sor|>> On Windows, this value will... | 13 |
lolphp | josefx | d22cqax | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 12 |
lolphp | poizan42 | d26nkxa | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 11 |
lolphp | mort96 | d2202tp | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>They could've at least made it "1337".<|eor|><|sor|>> On Windows, this value will... | 9 |
lolphp | bsander | d22h37q | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>Someone somewhere is looking at this function and thinking to themselves "Hmm, so ... | 8 |
lolphp | merreborn | d226bx0 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>At least PHP doesn't lack consistently inconsistent sleeping functions:
* [`int s... | 8 |
lolphp | xkcd_transcriber | d22h3p0 | <|sols|><|sot|>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<|eot|><|sol|>http://php.net/manual/en/function.sleep.php<|eol|><|sor|>Someone somewhere is looking at this function and thinking to themselves "Hmm, so ... | 7 |
lolphp | hobabaObama | 740xwy | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|eols|><|endoftext|> | 266 |
lolphp | TheBuzzSaw | dnur26w | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|sor|>This made my day.<|eor|><|eols|><|endoftext|> | 17 |
lolphp | cosmicsans | dnw2scv | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|sor|>PHP and C++ ? Those are 2 different jobs now, aren't they ?<|eor|><|sor|>No. a lot of Php applications that need some things to be super optimized will run those bits as C++ or just C. Go ... | 14 |
lolphp | BillyIII | dnvgw75 | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|sor|>This made my day.<|eor|><|sor|>Me too, I'm 12 btw.<|eor|><|sor|>I use arch.<|eor|><|eols|><|endoftext|> | 11 |
lolphp | Apollidore | dnvzj8u | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|sor|>PHP and C++ ? Those are 2 different jobs now, aren't they ?<|eor|><|eols|><|endoftext|> | 10 |
lolphp | mardukaz1 | do5s75q | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|sor|>This made my day.<|eor|><|sor|>This made my day.... three months ago.
https://www.reddit.com/r/ProgrammerHumor/top/?sort=top&t=all
> literally first fucking post
> with better delivery... | 9 |
lolphp | wecsam | dnv4q9u | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|sor|>This made my day.<|eor|><|sor|>Me too, I'm 12 btw.<|eor|><|sor|>I'm 20.<|eor|><|eols|><|endoftext|> | 9 |
lolphp | z500 | dnvdy51 | <|sols|><|sot|>I don't want my family and friends to be ashamed of me.<|eot|><|sol|>https://i.redd.it/31j8wsjhqmpz.png<|eol|><|sor|>This made my day.<|eor|><|sor|>Me too, I'm 12 btw.<|eor|><|sor|>I'm 20.<|eor|><|sor|>I'm 30 and I approve this message.<|eor|><|eols|><|endoftext|> | 9 |
lolphp | urielsalis | f3d3al | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|eols|><|endoftext|> | 260 |
lolphp | tobiasvl | fhim56z | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>reprecated<|eor|><|eols|><|endoftext|> | 54 |
lolphp | urielsalis | fhi0yaq | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>[deleted]<|eor|><|soopr|>https://www.php.net/manual/en/function.is-a.php<|eoopr|><|eols|><|endoftext|> | 27 |
lolphp | idontlikethisname | fhitba6 | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>Stuff does get undeprecated. This is why deprecation cycles are a thing. And FFS, this was all the way back in 5.3<|eor|><|sor|>Well, PHP is much saner nowadays compared to the old days. How are we supposed to ma... | 25 |
lolphp | chishiki | fhicdmg | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>~~de~~precated<|eor|><|eols|><|endoftext|> | 22 |
lolphp | barubary | fhi0tzf | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>[deleted]<|eor|><|sor|>[`is_a`](https://www.php.net/manual/en/function.is-a.php)<|eor|><|eols|><|endoftext|> | 20 |
lolphp | KokishinNeko | fhjjwkb | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>So, deprecated warning is deprecated?<|eor|><|eols|><|endoftext|> | 16 |
lolphp | bkdotcom | fhifv7p | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>I'll take "things that happened 11" years ago Alex.<|eor|><|eols|><|endoftext|> | 11 |
lolphp | supermario182 | fhj1l3a | <|sols|><|sot|>Function is no longer deprecated<|eot|><|sol|>https://i.imgur.com/RtsFKel.png<|eol|><|sor|>De-deprecated<|eor|><|eols|><|endoftext|> | 7 |
lolphp | mongopeter | 4oacnc | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|eols|><|endoftext|> | 216 |
lolphp | coredumperror | d4b5b2z | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|sor|>I wish I could say that I'm surprised. I really, really wish that.<|eor|><|eols|><|endoftext|> | 35 |
lolphp | kasnalin | d4bas7r | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|sor|>I don't quite get it. In what way is it not compatible with an ISO date? It even has the annoying "T" between the date and the time part.<|eor|><|sor|>You have to either have the colon and hyphen se... | 29 |
lolphp | yawkat | d4bdenr | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|sor|>That is so stupid... One of our APIs broke because they expected an ISO 8601 string and I really thought a constant named ISO8601 would give me an ISO 8601 string.
We had to hotfix the system and a... | 27 |
lolphp | DevelopThePrograms | d4evcbj | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|sor|>That is so stupid... One of our APIs broke because they expected an ISO 8601 string and I really thought a constant named ISO8601 would give me an ISO 8601 string.
We had to hotfix the system and a... | 14 |
lolphp | carlos_vini | d4b1s00 | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|sor|>https://m.reddit.com/r/lolphp/comments/3nz2hd/datetimeformatdatetimeiso8601_doesnt_format_date/<|eor|><|eols|><|endoftext|> | 13 |
lolphp | mongopeter | d4aw1bz | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|soopr|>http://php.net/manual/en/class.datetime.php<|eoopr|><|eols|><|endoftext|> | 12 |
lolphp | bart2019 | d4bajrz | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|sor|>I don't quite get it. In what way is it not compatible with an ISO date? It even has the annoying "T" between the date and the time part.<|eor|><|eols|><|endoftext|> | 8 |
lolphp | Synes_Godt_Om | d4bbhyf | <|sols|><|sot|>PHP and ISO 8601 (from php.net, link in comments)<|eot|><|sol|>http://i.imgur.com/ASxdrrF.png<|eol|><|sor|>This is a TRUE WTF. <|eor|><|eols|><|endoftext|> | 5 |
lolphp | midir | 4jhpv0 | <|sols|><|sot|>The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day<|eot|><|sol|>http://stackoverflow.com/a/37176824<|eol|><|eols|><|endoftext|> | 193 |
lolphp | Deranged40 | d36qzla | <|sols|><|sot|>The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day<|eot|><|sol|>http://stackoverflow.com/a/37176824<|eol|><|sor|>It was *supposed* to be 1 day. According to your post, it's 24 minutes because they switched the time from minut... | 59 |
lolphp | crankybadger | d379gfa | <|sols|><|sot|>The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day<|eot|><|sol|>http://stackoverflow.com/a/37176824<|eol|><|sor|>I love all the people claiming crap like this:
>Because most website visitors have, at most, 24 minutes between... | 52 |
lolphp | emilvikstrom | d36qglm | <|sols|><|sot|>The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day<|eot|><|sol|>http://stackoverflow.com/a/37176824<|eol|><|sor|>I have always wondered about this. I hate short session times! On our servers we always set it to two days.<|eor... | 19 |
lolphp | BowserKoopa | d380cuc | <|sols|><|sot|>The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day<|eot|><|sol|>http://stackoverflow.com/a/37176824<|eol|><|sor|>It was *supposed* to be 1 day. According to your post, it's 24 minutes because they switched the time from minut... | 14 |
lolphp | randomjackass | d37mkaw | <|sols|><|sot|>The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day<|eot|><|sol|>http://stackoverflow.com/a/37176824<|eol|><|sor|>I love all the people claiming crap like this:
>Because most website visitors have, at most, 24 minutes between... | 11 |
lolphp | emilvikstrom | d38g31b | <|sols|><|sot|>The default PHP session lifetime is 24 minutes, or 1440 seconds, because if it were 1440 minutes, then that would be exactly a day<|eot|><|sol|>http://stackoverflow.com/a/37176824<|eol|><|sor|>I have always wondered about this. I hate short session times! On our servers we always set it to two days.<|eor... | 11 |
lolphp | masklinn | 34sxw5 | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|eols|><|endoftext|> | 194 |
lolphp | masklinn | cqxs0yh | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|soopr|>The secret is that ` md5('240610708')` is `'0e462097431906509019562988736854'` and `md5('QNKCDZO')` is `'0e830400451993494058024219903391'`.
Both are of the form 0e{bunch of digits}, a valid scientific notation. So when... | 155 |
lolphp | deviltreh1 | cqxuaep | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|soopr|>The secret is that ` md5('240610708')` is `'0e462097431906509019562988736854'` and `md5('QNKCDZO')` is `'0e830400451993494058024219903391'`.
Both are of the form 0e{bunch of digits}, a valid scientific notation. So when... | 153 |
lolphp | HiddenKrypt | cqxus4a | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|soopr|>The secret is that ` md5('240610708')` is `'0e462097431906509019562988736854'` and `md5('QNKCDZO')` is `'0e830400451993494058024219903391'`.
Both are of the form 0e{bunch of digits}, a valid scientific notation. So when... | 42 |
lolphp | madsohm | cqxu10w | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|soopr|>The secret is that ` md5('240610708')` is `'0e462097431906509019562988736854'` and `md5('QNKCDZO')` is `'0e830400451993494058024219903391'`.
Both are of the form 0e{bunch of digits}, a valid scientific notation. So when... | 36 |
lolphp | stevenhp1987 | cqxs4f8 | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|sor|>This is why you should use `===`for anything like this.<|eor|><|eols|><|endoftext|> | 33 |
lolphp | ZiggyTheHamster | cqy7ivv | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|soopr|>The secret is that ` md5('240610708')` is `'0e462097431906509019562988736854'` and `md5('QNKCDZO')` is `'0e830400451993494058024219903391'`.
Both are of the form 0e{bunch of digits}, a valid scientific notation. So when... | 29 |
lolphp | ZiggyTheHamster | cqy7jlk | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|sor|>This is why you should use `===`for anything like this.<|eor|><|sor|>No.
You should use [hash_equals](http://php.net/manual/en/function.hash-equals.php) and `===` everywhere else.<|eor|><|eols|><|endoftext|> | 27 |
lolphp | adambrenecki | csgp6st | <|sols|><|sot|>md5('240610708') == md5('QNKCDZO')<|eot|><|sol|>http://3v4l.org/tT4l8<|eol|><|sor|>The last one of these is the best, IMHO.
var_dump('0xABCdef' == ' 0xABCdef');
- `true` in 4.3.0 - 4.3.9
- `false` in 4.3.10 - 4.4.9
- `true` in 5.0.0 - 5.0.2
- `false` in 5.0.3 - 5.2.0
- `true` in 5.2.1+
- `false... | 25 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.