subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
lolphp | vytah | ckdumjr | <|sols|><|sot|>array_diff: Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same.<|eot|><|sol|>http://php.net/manual/en/function.array-diff.php<|eol|><|sor|>Predicates are hard.
String concatenation is easy.
/language<|eor|><|sor|> ... | 10 |
lolphp | Various_Pickles | ckdugus | <|sols|><|sot|>array_diff: Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same.<|eot|><|sol|>http://php.net/manual/en/function.array-diff.php<|eol|><|sor|>Predicates are hard.
String concatenation is easy.
/language<|eor|><|eols|><... | 7 |
lolphp | TheDistantSea | 2e632o | <|sols|><|sot|>What could go wrong with simply cloning this object?<|eot|><|sol|>http://stackoverflow.com/q/25420812/50079<|eol|><|eols|><|endoftext|> | 37 |
lolphp | TheDistantSea | cjwfm9z | <|sols|><|sot|>What could go wrong with simply cloning this object?<|eot|><|sol|>http://stackoverflow.com/q/25420812/50079<|eol|><|sor|>> If you `var_dump($this->data)` before and after `assignReferences` in the constructor you will see that assigning those references causes the contents of `$this->data` to *become ref... | 12 |
lolphp | callcifer | cjwejiz | <|sols|><|sot|>What could go wrong with simply cloning this object?<|eot|><|sol|>http://stackoverflow.com/q/25420812/50079<|eol|><|sor|>> If you `var_dump($this->data)` before and after `assignReferences` in the constructor you will see that assigning those references causes the contents of `$this->data` to *become ref... | 11 |
lolphp | Banane9 | cjxcv07 | <|sols|><|sot|>What could go wrong with simply cloning this object?<|eot|><|sol|>http://stackoverflow.com/q/25420812/50079<|eol|><|sor|>For whatever reason, this seems perfectly expected to me. <|eor|><|sor|>You just get used to PHP being a clusterfuck.<|eor|><|eols|><|endoftext|> | 5 |
lolphp | anlutro | 2bl1j9 | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|eols|><|endoftext|> | 37 |
lolphp | BadFurDay | cj6cke8 | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|sor|>I hope people start using this genius idea enough that there would be a major backlash if php ever decides to fix strings.<|eor|><|eols|><|endoftext|> | 21 |
lolphp | ajmarks | cj6n6jw | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|sor|>Should h2 to h3 be --$heading?<|eor|><|sor|>2+1=3<|eor|><|sor|>h3 < h2<|eor|><|eols|><|endoftext|> | 15 |
lolphp | Trig90 | cj6cz8q | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|sor|>I hope people start using this genius idea enough that there would be a major backlash if php ever decides to fix strings.<|eor|><|sor|>relevant http://xkcd.com/1172/<|eor|><|eols|><|endoftext|> | 13 |
lolphp | ajmarks | cj6p0qt | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|sor|>Should h2 to h3 be --$heading?<|eor|><|sor|>2+1=3<|eor|><|sor|>h3 < h2<|eor|><|sor|>Its not like this is built into PHP.<|eor|><|sor|>thatsthejoke.gif<|eor|><|eols|><|endoftext|> | 13 |
lolphp | ajmarks | cj6g08d | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|sor|>Should h2 to h3 be --$heading?<|eor|><|eols|><|endoftext|> | 12 |
lolphp | image_linker_bot | cj6p1dh | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|sor|>Should h2 to h3 be --$heading?<|eor|><|sor|>2+1=3<|eor|><|sor|>h3 < h2<|eor|><|sor|>Its not like this is built into PHP.<|eor|><|sor|>thatsthejoke.gif<|eor|><|sor|>[thatsthejoke.gif](http://i.imgur.com/N... | 11 |
lolphp | xkcd_transcriber | cj6czgj | <|sols|><|sot|>Finally a good practical use for string incrementing!<|eot|><|sol|>http://3v4l.org/VXLuc<|eol|><|sor|>I hope people start using this genius idea enough that there would be a major backlash if php ever decides to fix strings.<|eor|><|sor|>relevant http://xkcd.com/1172/<|eor|><|sor|>[Image](http://imgs.xkc... | 5 |
lolphp | midir | y7dun | <|soss|><|sot|>The PHP way: Variables are case-sensitive but function names are not. Class names aren't either, unless you autoload them on a case-sensitive filesystem, then case matters again.<|eot|><|sost|>Keywords are case-insensitive too, apparently. This works:
<?PHP label: PRINT "Hello World!"; GOTO label ?>... | 38 |
lolphp | Persism | tw1426 | <|sols|><|sot|>15-Year-Old Bug in PEAR PHP Repository Could've Enabled Supply Chain Attacks<|eot|><|sol|>https://thehackernews.com/2022/04/15-year-old-bug-in-pear-php-repository.html?m=1<|eol|><|eols|><|endoftext|> | 38 |
lolphp | morphotomy | i3ck7vf | <|sols|><|sot|>15-Year-Old Bug in PEAR PHP Repository Could've Enabled Supply Chain Attacks<|eot|><|sol|>https://thehackernews.com/2022/04/15-year-old-bug-in-pear-php-repository.html?m=1<|eol|><|sor|>... if anyone actually used PEAR.<|eor|><|eols|><|endoftext|> | 24 |
lolphp | barubary | i3gpzks | <|sols|><|sot|>15-Year-Old Bug in PEAR PHP Repository Could've Enabled Supply Chain Attacks<|eot|><|sol|>https://thehackernews.com/2022/04/15-year-old-bug-in-pear-php-repository.html?m=1<|eol|><|sor|>The password reset bug is great. The original implementation of `passwordmanage.php` from 15 years ago generates reset t... | 14 |
lolphp | Persism | i3hhi9l | <|sols|><|sot|>15-Year-Old Bug in PEAR PHP Repository Could've Enabled Supply Chain Attacks<|eot|><|sol|>https://thehackernews.com/2022/04/15-year-old-bug-in-pear-php-repository.html?m=1<|eol|><|sor|>The password reset bug is great. The original implementation of `passwordmanage.php` from 15 years ago generates reset t... | 7 |
lolphp | morphotomy | i3hhz0g | <|sols|><|sot|>15-Year-Old Bug in PEAR PHP Repository Could've Enabled Supply Chain Attacks<|eot|><|sol|>https://thehackernews.com/2022/04/15-year-old-bug-in-pear-php-repository.html?m=1<|eol|><|sor|>The password reset bug is great. The original implementation of `passwordmanage.php` from 15 years ago generates reset t... | 6 |
lolphp | kalcora | sml1sm | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 39 |
lolphp | chucker23n | hvxtetc | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 21 |
lolphp | blbil | hvyiybq | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 12 |
lolphp | sproingie | hvyj61g | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 11 |
lolphp | colshrapnel | hvypmt4 | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 9 |
lolphp | colshrapnel | hvxgf7t | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 9 |
lolphp | blbil | hvxqxu2 | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 8 |
lolphp | barubary | hvzolsd | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 7 |
lolphp | Silly-Freak | hvyibi1 | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 6 |
lolphp | Silly-Freak | hvym6vh | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 6 |
lolphp | operator-- | hvyto2f | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 6 |
lolphp | SaltineAmerican_1970 | hvxs4h0 | <|soss|><|sot|>Operator precedence<|eot|><|sost|>These two lines are not equivalent.
<?php
$a = true && false; // false
$b = true and false; // true
Because `&&` and `||` have different operator priority than `and` and `or` (the latter ones have lower priority than `=`).
[Source](https://www.p... | 5 |
lolphp | phplovesong | jp6d11 | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 38 |
lolphp | wweber | gbd3f17 | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 31 |
lolphp | CarnivorousSociety | gbd2yup | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 22 |
lolphp | iamcgn | gbcvymf | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 19 |
lolphp | bkdotcom | gbd82fi | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 18 |
lolphp | bkdotcom | gbczgfa | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 12 |
lolphp | bkdotcom | gbczmlg | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 9 |
lolphp | elcapitanoooo | gbynmle | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 6 |
lolphp | Takeoded | gbhtzaf | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 5 |
lolphp | nikic | gbtexvi | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 5 |
lolphp | elcapitanoooo | gbxde73 | <|soss|><|sot|>PHP: Cast away<|eot|><|sost|>PHP likes to cast like theres no tomorrow. Also PHP leaks the "continue" statement, and if given, actually uses it inside a switch as a break. So now switches have two ways of doing the same thing, why? Probably because to have the most inconsistent API in the world of progra... | 5 |
lolphp | shitcanz | bznl3l | <|soss|><|sot|>Meanwhile in PHP RFC<|eot|><|sost|>PHP has such amazing innovation going on..
https://wiki.php.net/rfc/tostring_exceptions<|eost|><|eoss|><|endoftext|> | 36 |
lolphp | AlGoreBestGore | equdjtj | <|soss|><|sot|>Meanwhile in PHP RFC<|eot|><|sost|>PHP has such amazing innovation going on..
https://wiki.php.net/rfc/tostring_exceptions<|eost|><|sor|>The workaround in Symfony is also pretty gnarly https://github.com/symfony/symfony/blob/1c110fa1f7e3e9f5daba73ad52d9f7e843a7b3ff/src/Symfony/Component/Debug/ErrorHandl... | 20 |
lolphp | dotancohen | equ2ia6 | <|soss|><|sot|>Meanwhile in PHP RFC<|eot|><|sost|>PHP has such amazing innovation going on..
https://wiki.php.net/rfc/tostring_exceptions<|eost|><|sor|>This one is a real mess. I'm sitting on both sides of the fence here. Special-casing \_\_toString() was silly.<|eor|><|eoss|><|endoftext|> | 10 |
lolphp | janvt | er4z4bo | <|soss|><|sot|>Meanwhile in PHP RFC<|eot|><|sost|>PHP has such amazing innovation going on..
https://wiki.php.net/rfc/tostring_exceptions<|eost|><|sor|>The workaround in Symfony is also pretty gnarly https://github.com/symfony/symfony/blob/1c110fa1f7e3e9f5daba73ad52d9f7e843a7b3ff/src/Symfony/Component/Debug/ErrorHandl... | 9 |
lolphp | dotancohen | er03rgx | <|soss|><|sot|>Meanwhile in PHP RFC<|eot|><|sost|>PHP has such amazing innovation going on..
https://wiki.php.net/rfc/tostring_exceptions<|eost|><|sor|>The workaround in Symfony is also pretty gnarly https://github.com/symfony/symfony/blob/1c110fa1f7e3e9f5daba73ad52d9f7e843a7b3ff/src/Symfony/Component/Debug/ErrorHandl... | 5 |
lolphp | phplovesong | bblr7x | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 40 |
lolphp | Miserable_Fuck | ekjziir | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 27 |
lolphp | SirClueless | ekjzy3u | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 25 |
lolphp | redwall_hp | ekkayl5 | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 22 |
lolphp | Miserable_Fuck | ekyt4gl | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 11 |
lolphp | jesseschalken | ekju1dt | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 10 |
lolphp | BrianBoyko | el90bbh | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 10 |
lolphp | SituationSoap | ekke0nv | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 9 |
lolphp | TheBuzzSaw | ekpwv2w | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 6 |
lolphp | phplovesong | ekm8vtw | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 6 |
lolphp | SirClueless | ekl8s5e | <|soss|><|sot|>PHP: a fractal of bad design - 7 years old and still relevant<|eot|><|sost|>One of the best articles describing the true nature of PHP is 7 years old! This article has made multiple rounds on the internet, and 1000s of developers have probably learnt what PHP truly is.
In these 7 years many of t issues ... | 6 |
lolphp | malachias | 8bham9 | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 36 |
lolphp | kasnalin | dx75x0z | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 23 |
lolphp | inabahare | dx7ebrp | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 13 |
lolphp | inabahare | dxenycv | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 10 |
lolphp | HildartheDorf | dx6p19u | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 9 |
lolphp | cfreak2399 | dx7u4ru | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 8 |
lolphp | malachias | dx6spd3 | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 8 |
lolphp | malachias | dx6sthb | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 8 |
lolphp | inabahare | dx6p40n | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 7 |
lolphp | malachias | dxbbt0m | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 7 |
lolphp | Various_Pickles | dxdjpjb | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 6 |
lolphp | fell_ratio | dx6oqqq | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 5 |
lolphp | OneWingedShark | dx80ngq | <|soss|><|sot|>Logical or: "||" vs "or"<|eot|><|sost|>PHP supports both.
Now, without googling or throwing it into a REPL, who can tell me what this outputs?
$a = 0;
$b = 1;
if ($a || $b) echo "yes\n";
if ($a or $b) echo "yes\n";
$x = $a || $b; echo "x: $x\n";
$x = $a or $b; echo "x: $x\n";
... | 5 |
lolphp | prewk | 77kssu | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|eols|><|endoftext|> | 37 |
lolphp | Various_Pickles | domqgs1 | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|sor|>I like how fucking none of PHP's array_*, implode, explode, etc functions work with anything but actual, explicit arrays.
Go write your own core library ~~Traversable~~ iterable!<|eor|><|eols|><|end... | 25 |
lolphp | sloat | domywv2 | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 23 |
lolphp | Xymanek | domsb33 | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 15 |
lolphp | mardukaz1 | domsjs7 | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|sor|>I like how fucking none of PHP's array_*, implode, explode, etc functions work with anything but actual, explicit arrays.
Go write your own core library ~~Traversable~~ iterable!<|eor|><|sor|>Well, ... | 14 |
lolphp | Various_Pickles | domr2j1 | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|sor|>I like how fucking none of PHP's array_*, implode, explode, etc functions work with anything but actual, explicit arrays.
Go write your own core library ~~Traversable~~ iterable!<|eor|><|sor|>Well, ... | 13 |
lolphp | prewk | domwses | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 12 |
lolphp | Saltub | dompnhl | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 11 |
lolphp | corvus_192 | domuv6y | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 9 |
lolphp | prewk | domn8vk | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 8 |
lolphp | the_alias_of_andrea | don6oz2 | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 8 |
lolphp | the_alias_of_andrea | don6qwq | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 8 |
lolphp | Schmittfried | don4ybt | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|soopr|>We had the usual problems with filtering normal arrays requiring `array_values` to keep it from turning into an object when JSON encoding (holes in PHP's "array" turns it into a hashmap). So I look... | 8 |
lolphp | Schmittfried | don52zv | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|sor|>[deleted]<|eor|><|soopr|>But it _is_ json serializable, that's not my complaint. It's what it serializes into.
Do you really think it's too much to ask from a _guaranteed sequential normal array_, t... | 7 |
lolphp | prewk | domwfkz | <|sols|><|sot|>PHP's only "real" array type JSON encodes into an object<|eot|><|sol|>https://3v4l.org/hYjiI<|eol|><|sor|>[deleted]<|eor|><|soopr|>But it _is_ json serializable, that's not my complaint. It's what it serializes into.
Do you really think it's too much to ask from a _guaranteed sequential normal array_, t... | 6 |
lolphp | tonymyre311 | 47dqbf | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 40 |
lolphp | ANAL_GRAVY | d0cf9me | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 17 |
lolphp | MonkeeSage | d0d24y6 | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 14 |
lolphp | DoctorWaluigiTime | d0ch992 | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 13 |
lolphp | merreborn | d0csdgm | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 12 |
lolphp | the_alias_of_andrea | d0c61vb | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 11 |
lolphp | phoshi | d0ckcbu | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 11 |
lolphp | the_pw_is_in_this_ID | d0cuxvs | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 8 |
lolphp | headzoo | d0d11go | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 6 |
lolphp | Matt3k | d0dbs51 | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 6 |
lolphp | phoshi | d0cmwxd | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 6 |
lolphp | the_alias_of_andrea | d0d34qq | <|soss|><|sot|>Meta-example: php.net local storage<|eot|><|sost|>I noticed I was getting a lot of requests by my browser to increase local storage quotas for most sites I was visiting. A bit of digging later and I noticed that various php.net domains (php.net, us.php.net, us1.php.net, etc.) were using excessive amounts... | 5 |
lolphp | cbraga | 45iyo6 | <|sols|><|sot|>"phpversions.info now highlights PHP versions with known security issues", they could've saved themselves the effort and just painted everything red though<|eot|><|sol|>http://phpversions.info/shared-hosting/<|eol|><|eols|><|endoftext|> | 39 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.