subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
lolphp | berkes | cffxjbi | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>Wrong subreddit surely? Why is this here?<|eor|><|sor|>The HTTP and HTML specs all say it should b... | 10 |
lolphp | mck1117 | cffvw5o | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>You can also give an index to the array (string or number), so technically they *don't* have the s... | 7 |
lolphp | Matt3k | cffpv32 | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>Well that's annoying if you want it to be an array with one item.<|eor|><|sor|>Yeah, I see your po... | 7 |
lolphp | bart2019 | cffdpe9 | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>You can also give an index to the array (string or number), so technically they *don't* have the s... | 5 |
lolphp | until0 | cffh818 | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>Well, to be fair, other frameworks have made similar features (Dancer) that are nice, but I suppos... | 5 |
lolphp | ANAL_GRAVY | cffe9f2 | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>It's such a beautiful feature.
[PHP Vulnerability May Halt Millions of Servers](http://www.phpcla... | 5 |
lolphp | cwmonkey | cffkys1 | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>Wrong subreddit surely? Why is this here?<|eor|><|sor|>Users of other languages find this hilariou... | 5 |
lolphp | mellett68 | cffi60e | <|sols|><|sot|>"Reading two form elements with same name" - that's an interesting problem, PHP has you covered!<|eot|><|sol|>http://stackoverflow.com/questions/5643981/reading-two-form-elements-with-same-name<|eol|><|sor|>It's such a beautiful feature.
[PHP Vulnerability May Halt Millions of Servers](http://www.phpcla... | 5 |
lolphp | seriouslulz | 1w2fwa | <|sols|><|sot|>Syntax Horror (French website but the code is pretty self-explanatory)<|eot|><|sol|>http://syntaxhorror.com/-php-<|eol|><|eols|><|endoftext|> | 10 |
lolphp | catcradle5 | cey6rgb | <|sols|><|sot|>Syntax Horror (French website but the code is pretty self-explanatory)<|eot|><|sol|>http://syntaxhorror.com/-php-<|eol|><|sor|>>Parce que fuck foreach et fuck $_POST
I like how "fuck" is a universal term, even in other languages.<|eor|><|eols|><|endoftext|> | 5 |
lolphp | Ghosty141 | ml9wb4 | <|soss|><|sot|>kilobyte, kibibyte, who cares!<|eot|><|sost|>https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
>Note: kilobyte versus kibibyte
>The PHP notation describes one kilobyte as equalling 1024 bytes, whereas the IEC standard considers this to be a kibibyte instead. Summary: k and K = 1024 b... | 10 |
lolphp | keis | gtkd0nl | <|soss|><|sot|>kilobyte, kibibyte, who cares!<|eot|><|sost|>https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
>Note: kilobyte versus kibibyte
>The PHP notation describes one kilobyte as equalling 1024 bytes, whereas the IEC standard considers this to be a kibibyte instead. Summary: k and K = 1024 b... | 29 |
lolphp | Muzer0 | gtkhu90 | <|soss|><|sot|>kilobyte, kibibyte, who cares!<|eot|><|sost|>https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
>Note: kilobyte versus kibibyte
>The PHP notation describes one kilobyte as equalling 1024 bytes, whereas the IEC standard considers this to be a kibibyte instead. Summary: k and K = 1024 b... | 7 |
lolphp | Muzer0 | gtkfeg4 | <|soss|><|sot|>kilobyte, kibibyte, who cares!<|eot|><|sost|>https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
>Note: kilobyte versus kibibyte
>The PHP notation describes one kilobyte as equalling 1024 bytes, whereas the IEC standard considers this to be a kibibyte instead. Summary: k and K = 1024 b... | 6 |
lolphp | Ghosty141 | gtkfv63 | <|soss|><|sot|>kilobyte, kibibyte, who cares!<|eot|><|sost|>https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
>Note: kilobyte versus kibibyte
>The PHP notation describes one kilobyte as equalling 1024 bytes, whereas the IEC standard considers this to be a kibibyte instead. Summary: k and K = 1024 b... | 5 |
lolphp | Jinxuan | fdh77z | <|soss|><|sot|>array to string is a warning, while object to string is an error<|eot|><|sost|>Though neither array nor object can be converted to string, they still behaves differently in string conversion.
```
$x = (string) []; // PHP notice: Array to string conversion
var_dump($x); // $x is an array; not string
$y = ... | 9 |
lolphp | barubary | fjkb0a4 | <|soss|><|sot|>array to string is a warning, while object to string is an error<|eot|><|sost|>Though neither array nor object can be converted to string, they still behaves differently in string conversion.
```
$x = (string) []; // PHP notice: Array to string conversion
var_dump($x); // $x is an array; not string
$y = ... | 6 |
lolphp | Takeoded | 8e1mrv | <|soss|><|sot|>TCP socket is both connected and not connected at the same time.<|eot|><|sost|>i'd showcase this in a php testbed (ala 3v4l.org ) if i could, but the only public php testbed allowing network connections that i know of, codepad.viper-7.com , has shut down, so i can't.
try running
<?php
error_re... | 10 |
lolphp | myaut | dxrv9al | <|soss|><|sot|>TCP socket is both connected and not connected at the same time.<|eot|><|sost|>i'd showcase this in a php testbed (ala 3v4l.org ) if i could, but the only public php testbed allowing network connections that i know of, codepad.viper-7.com , has shut down, so i can't.
try running
<?php
error_re... | 14 |
lolphp | AyrA_ch | dxrzlas | <|soss|><|sot|>TCP socket is both connected and not connected at the same time.<|eot|><|sost|>i'd showcase this in a php testbed (ala 3v4l.org ) if i could, but the only public php testbed allowing network connections that i know of, codepad.viper-7.com , has shut down, so i can't.
try running
<?php
error_re... | 12 |
lolphp | shaql | dxsfw7n | <|soss|><|sot|>TCP socket is both connected and not connected at the same time.<|eot|><|sost|>i'd showcase this in a php testbed (ala 3v4l.org ) if i could, but the only public php testbed allowing network connections that i know of, codepad.viper-7.com , has shut down, so i can't.
try running
<?php
error_re... | 7 |
lolphp | 6f944ee6 | 5i5rac | <|sols|><|sot|>value should be converted to a boolean correctly when non-empty string is passed to it<|eot|><|sol|>https://github.com/php/php-src/pull/2240<|eol|><|eols|><|endoftext|> | 12 |
lolphp | ZiggyTheHamster | db5tkgf | <|sols|><|sot|>value should be converted to a boolean correctly when non-empty string is passed to it<|eot|><|sol|>https://github.com/php/php-src/pull/2240<|eol|><|sor|>The lolphp is that casting a string with no numbers in it to a long works instead of raising an error.
In basically any other language, if you used `c... | 7 |
lolphp | pilif | 2q3182 | <|sols|><|sot|>The mystery of dir()<|eot|><|sol|>http://3v4l.org/a39OP<|eol|><|eols|><|endoftext|> | 12 |
lolphp | Various_Pickles | cn2hj42 | <|sols|><|sot|>The mystery of dir()<|eot|><|sol|>http://3v4l.org/a39OP<|eol|><|soopr|>`dir()` returns something that's not implementing `Traversable`, the interface that, according to [the docs](http://php.net/Traversable) is
> Interface to detect if a class is traversable using foreach.
and yet, you can use foreach(... | 19 |
lolphp | pilif | cn2c0ex | <|sols|><|sot|>The mystery of dir()<|eot|><|sol|>http://3v4l.org/a39OP<|eol|><|soopr|>`dir()` returns something that's not implementing `Traversable`, the interface that, according to [the docs](http://php.net/Traversable) is
> Interface to detect if a class is traversable using foreach.
and yet, you can use foreach(... | 5 |
lolphp | koro666 | 1srq5h | <|sols|><|sot|>eBay remote code execution because PHP parses variable names in certain strings<|eot|><|sol|>http://www.reddit.com/r/netsec/comments/1sqppp/ebay_remotecodeexecution/<|eol|><|eols|><|endoftext|> | 11 |
lolphp | nikic | ce14t16 | <|sols|><|sot|>eBay remote code execution because PHP parses variable names in certain strings<|eot|><|sol|>http://www.reddit.com/r/netsec/comments/1sqppp/ebay_remotecodeexecution/<|eol|><|sor|>Most of the linked article is nonsense, from a technical POV (or maybe just very badly explained). What happened here is simpl... | 5 |
lolphp | Mattho | 1l6e7j | <|sols|><|sot|>Python generators? compared to other languages<|eot|><|sol|>http://lwn.net/Articles/564871/<|eol|><|eols|><|endoftext|> | 10 |
lolphp | nikic | cbwbsqs | <|sols|><|sot|>Python generators? compared to other languages<|eot|><|sol|>http://lwn.net/Articles/564871/<|eol|><|sor|>"Generators" are something completely different and have nothing to do with the discussion you linked.<|eor|><|eols|><|endoftext|> | 29 |
lolphp | kageurufu | cbwcrxs | <|sols|><|sot|>Python generators? compared to other languages<|eot|><|sol|>http://lwn.net/Articles/564871/<|eol|><|sor|>That was list comprehension, a generator would be in parenthesis, instead of brackets.
the reasons to use a generator, would be things like looping through it and breaking at some point. This would l... | 8 |
lolphp | beingryu | qmvtp | <|soss|><|sot|>Guess the output<|eot|><|sost|> echo(1) and print(2) and die(3); # 2
echo print('3').'2'.print('4'); # 43211
print(1) and print(2) and die(3); # 12 <- edited
Inspired by [this](http://www.reddit.com/r/lolphp/comments/j21bv/guess_the_output_echo1_and_print2_and_die3/) post. Would someone expla... | 10 |
lolphp | Rhomboid | c3yw0be | <|soss|><|sot|>Guess the output<|eot|><|sost|> echo(1) and print(2) and die(3); # 2
echo print('3').'2'.print('4'); # 43211
print(1) and print(2) and die(3); # 12 <- edited
Inspired by [this](http://www.reddit.com/r/lolphp/comments/j21bv/guess_the_output_echo1_and_print2_and_die3/) post. Would someone expla... | 8 |
lolphp | ealf | j7z1z | <|sols|><|sot|>GTO: $a = new stdclass(); unset($a->foo->bar->baz); var_dump($a);<|eot|><|sol|>http://codepad.org/ICTy0w3O<|eol|><|eols|><|endoftext|> | 12 |
lolphp | ch0wn | fz980 | <|sols|><|sot|>NoSQL Request Injection Attacks thanks to Magic Variables<|eot|><|sol|>http://www.php.net/manual/en/mongo.security.php<|eol|><|eols|><|endoftext|> | 11 |
lolphp | ealf | eldv2 | <|soss|><|sot|>exit -1;<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 10 |
lolphp | Takeoded | hj7gbq | <|sols|><|sot|>display_errors=1 for "HTTP 200 OK", display_errors=0 for "HTTP 500 Internal Server Error" ...<|eot|><|sol|>https://3v4l.org/LElPO<|eol|><|eols|><|endoftext|> | 8 |
lolphp | Takeoded | fwl7z06 | <|sols|><|sot|>display_errors=1 for "HTTP 200 OK", display_errors=0 for "HTTP 500 Internal Server Error" ...<|eot|><|sol|>https://3v4l.org/LElPO<|eol|><|sor|>You forgot the closing php tag<|eor|><|soopr|>quoting section 2.2 of [PSR12](https://www.php-fig.org/psr/psr-12/):
```
The closing ?> tag MUST be omitted from fi... | 6 |
lolphp | Jinxuan | ej5k29 | <|soss|><|sot|>array_diff, array_udiff, array_diff_assoc, array_udiff_assoc, array_diff_keys, array_undiff_keys and +<|eot|><|sost|>Therefore is a lot of array\_diff function names in php by respecting key differently.
Meanwhile, it does not provide array\_merge\_assoc to always respect key associatively. If you wan... | 10 |
lolphp | Altreus | fcxibz8 | <|soss|><|sot|>array_diff, array_udiff, array_diff_assoc, array_udiff_assoc, array_diff_keys, array_undiff_keys and +<|eot|><|sost|>Therefore is a lot of array\_diff function names in php by respecting key differently.
Meanwhile, it does not provide array\_merge\_assoc to always respect key associatively. If you wan... | 10 |
lolphp | Takeoded | dy2vh0 | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|eols|><|endoftext|> | 8 |
lolphp | barubary | f7z2r9n | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>You know what the docs mean, and everyone who reads it would.<|eor|><|sor|>I don't. What is the `string $encoding = mb_internal_encoding()` part suppos... | 17 |
lolphp | shaql | f81wkwm | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>Are you sure about that? Docs says function returns current encoding if argument is not passed. Recursive function call looks like an error in docs.<|e... | 12 |
lolphp | barubary | f7yw9ns | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>You know what the docs mean, and everyone who reads it would.<|eor|><|sor|>I don't. What is the `string $encoding = mb_internal_encoding()` part suppos... | 11 |
lolphp | Takeoded | f7yp3c4 | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|soopr|>if it's called without any arguments, then.. it will call itself, without any arguments -- signed, docs<|eoopr|><|sor|>Not true.<|eor|><|soopr|>[http... | 11 |
lolphp | barubary | f7yvc5k | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|soopr|>if it's called without any arguments, then.. it will call itself, without any arguments -- signed, docs<|eoopr|><|sor|>Not true.<|eor|><|sor|>That's ... | 11 |
lolphp | zushk | f7y3haz | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>Are you sure about that? Docs says function returns current encoding if argument is not passed. Recursive function call looks like an error in docs.<|e... | 9 |
lolphp | barubary | f7yu80k | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>Nice find.
Not much better: [`mb_chr`](https://www.php.net/manual/en/function.mb-chr.php)
> **Warning** This function is currently not documented; on... | 9 |
lolphp | Takeoded | f7ypet0 | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>Are you sure about that? Docs says function returns current encoding if argument is not passed. Recursive function call looks like an error in docs.<|e... | 9 |
lolphp | Takeoded | f7xzt0c | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|soopr|>if it's called without any arguments, then.. it will call itself, without any arguments -- signed, docs<|eoopr|><|eols|><|endoftext|> | 8 |
lolphp | Takeoded | f8461ow | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>You know what the docs mean, and everyone who reads it would.<|eor|><|soopr|> yeah but it still looks funny, or at least I thought it was funny<|eoopr|... | 7 |
lolphp | the_alias_of_andrea | f7yvr1i | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>You know what the docs mean, and everyone who reads it would.<|eor|><|eols|><|endoftext|> | 5 |
lolphp | Cranio76 | f7y5rnf | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|soopr|>if it's called without any arguments, then.. it will call itself, without any arguments -- signed, docs<|eoopr|><|sor|>Not true.<|eor|><|eols|><|endo... | 5 |
lolphp | Crandom | f8163z2 | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|soopr|>if it's called without any arguments, then.. it will call itself, without any arguments -- signed, docs<|eoopr|><|sor|>Not true.<|eor|><|soopr|>[http... | 5 |
lolphp | Takeoded | f7z6p55 | <|sols|><|sot|>mb_internal_encoding()'s default behavior is.. a stack overflow<|eot|><|sol|>https://www.php.net/manual/en/function.mb-internal-encoding.php<|eol|><|sor|>You know what the docs mean, and everyone who reads it would.<|eor|><|sor|>I don't. What is the `string $encoding = mb_internal_encoding()` part suppos... | 5 |
lolphp | Takeoded | czos0d | <|sols|><|sot|>explode()'s limit doesn't work with 0.<|eot|><|sol|>https://3v4l.org/5TjXl<|eol|><|eols|><|endoftext|> | 7 |
lolphp | maweki | eyztq3j | <|sols|><|sot|>explode()'s limit doesn't work with 0.<|eot|><|sol|>https://3v4l.org/5TjXl<|eol|><|sor|>At least the documentation (https://www.php.net/manual/en/function.explode.php) says as much:
> If the limit parameter is zero, then this is treated as 1.
Can we instead talk about "If delimiter is an empty string ... | 24 |
lolphp | SirClueless | eyzowoq | <|sols|><|sot|>explode()'s limit doesn't work with 0.<|eot|><|sol|>https://3v4l.org/5TjXl<|eol|><|sor|>You're trying to divide a string into 0 elements? Good luck with that.<|eor|><|eols|><|endoftext|> | 17 |
lolphp | SirClueless | eyzpo54 | <|sols|><|sot|>explode()'s limit doesn't work with 0.<|eot|><|sol|>https://3v4l.org/5TjXl<|eol|><|sor|>You're trying to divide a string into 0 elements? Good luck with that.<|eor|><|soopr|>try doing it in javascript then:
"hello SirClueless, How are you doing?".split(" ",0);
this tells javascript to split the str... | 14 |
lolphp | SirClueless | eyztn6a | <|sols|><|sot|>explode()'s limit doesn't work with 0.<|eot|><|sol|>https://3v4l.org/5TjXl<|eol|><|sor|>You're trying to divide a string into 0 elements? Good luck with that.<|eor|><|soopr|>try doing it in javascript then:
"hello SirClueless, How are you doing?".split(" ",0);
this tells javascript to split the str... | 6 |
lolphp | godman_8 | 776wyr | <|soss|><|sot|>Inconsistent print?<|eot|><|sost|>// Run these two sections of code separately for this to work.
// This outputs the date string
////////////////////////////////////////////
<?php
$today = new DateTime();
print_r($today);
print($today->date);
////////////////////////////////////////////
// This t... | 9 |
lolphp | squiggleslash | dojiapy | <|soss|><|sot|>Inconsistent print?<|eot|><|sost|>// Run these two sections of code separately for this to work.
// This outputs the date string
////////////////////////////////////////////
<?php
$today = new DateTime();
print_r($today);
print($today->date);
////////////////////////////////////////////
// This t... | 14 |
lolphp | godman_8 | dojiwo6 | <|soss|><|sot|>Inconsistent print?<|eot|><|sost|>// Run these two sections of code separately for this to work.
// This outputs the date string
////////////////////////////////////////////
<?php
$today = new DateTime();
print_r($today);
print($today->date);
////////////////////////////////////////////
// This t... | 9 |
lolphp | MonkeeSage | dokt46r | <|soss|><|sot|>Inconsistent print?<|eot|><|sost|>// Run these two sections of code separately for this to work.
// This outputs the date string
////////////////////////////////////////////
<?php
$today = new DateTime();
print_r($today);
print($today->date);
////////////////////////////////////////////
// This t... | 9 |
lolphp | hfern | 2uj8pu | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|eols|><|endoftext|> | 9 |
lolphp | cfreak2399 | co8wqz9 | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>The spaceship operator is a thing in Perl<|eor|><|eols|><|endoftext|> | 18 |
lolphp | Porges | co9o41k | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>It's a shame this is type-juggled like `==`. A new comparison operator especially a single unified `<=>` would have been a prime opportunity to fix what's... | 18 |
lolphp | Neckbeard_Prime | co9udi8 | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>It's a shame this is type-juggled like `==`. A new comparison operator especially a single unified `<=>` would have been a prime opportunity to fix what's... | 17 |
lolphp | willglynn | co91j5t | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>It's a shame this is type-juggled like `==`. A new comparison operator especially a single unified `<=>` would have been a prime opportunity to fix what's... | 14 |
lolphp | djsumdog | cob6z2n | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>When are we getting the ()====> operator?<|eor|><|sor|>()===D~ if you want to be type-safe<|eor|><|eols|><|endoftext|> | 12 |
lolphp | mesoscalevortex | co9vhz9 | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>When are we getting the ()====> operator?<|eor|><|eols|><|endoftext|> | 9 |
lolphp | tdammers | co8x9tl | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>Or how about making a language where people can implement their own operators, just like that; then people can provide this stuff as libraries, instead of a... | 9 |
lolphp | allthediamonds | cob47wo | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>`T_SPACESHIP`? Really?
Other than that, it's cool for them to try and chase feature parity with Perl 4.<|eor|><|eols|><|endoftext|> | 7 |
lolphp | thelordofcheese | co93rju | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|soopr|>Doesn't compare($a, $b) seem more appropriate then introducing a language operator?
Edit: removed sarcasm :/<|eoopr|><|sor|>Yeah, simplified aliases are ... | 6 |
lolphp | duskwuff | co9dejl | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>But.. but... why the hell would you do -1 if the righthand expression is greater? That makes no sense at all!<|eor|><|sor|>For consistency with functions li... | 6 |
lolphp | Various_Pickles | cob6doh | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>It's a shame this is type-juggled like `==`. A new comparison operator especially a single unified `<=>` would have been a prime opportunity to fix what's... | 6 |
lolphp | vytah | coej47j | <|sols|><|sot|>Library function turns language operator: The <=> Spaceship Operator<|eot|><|sol|>https://wiki.php.net/rfc/combined-comparison-operator<|eol|><|sor|>But.. but... why the hell would you do -1 if the righthand expression is greater? That makes no sense at all!<|eor|><|sor|>Use this as a mnemonic:
2 ... | 5 |
lolphp | ealf | g4yyy | <|soss|><|sot|>Which is true, (++$a == $a) or ($a == ++$a)?<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 10 |
lolphp | bobindashadows | c1kzsot | <|soss|><|sot|>Which is true, (++$a == $a) or ($a == ++$a)?<|eot|><|sost|><|eost|><|sor|>Both?! What the fuck?!<|eor|><|eoss|><|endoftext|> | 8 |
lolphp | ealf | f91wt | <|soss|><|sot|>Segfault the interpreter with a typo<|eot|><|sost|> class A {
var $a;
public function __toString() {
return $this>a;
}
}
echo new A();
... outputs ...
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address... | 11 |
lolphp | saintpetejackboy | ewxzt5 | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 6 |
lolphp | nikic | fg64gwp | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 42 |
lolphp | beerdude26 | fg5x3jb | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 30 |
lolphp | perk11 | fg5mq09 | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 21 |
lolphp | simon816 | fg58kkg | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 18 |
lolphp | sproingie | fg6jb8r | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 18 |
lolphp | postmodest | fg6uh9p | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 11 |
lolphp | gerrywastaken | fg629nt | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 9 |
lolphp | MUK99 | fg676x4 | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 7 |
lolphp | postmodest | fg6uw6k | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 7 |
lolphp | saintpetejackboy | fg58oe1 | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 7 |
lolphp | cleeder | fg5fgam | <|soss|><|sot|>PHP does not do random<|eot|><|sost|>I posted a bug report many years ago. If it was fixed, nobody seems to recognize it.
My original project was trying to see if there was a pattern in "random noise", so I generated colored dots on the screen, with random colors and x,y coordinates. After many gener... | 7 |
lolphp | Mark_Messa | docrpk | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 8 |
lolphp | Targren | f5m7dg2 | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 13 |
lolphp | duskwuff | f5mk4i9 | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 12 |
lolphp | duskwuff | f5mbal2 | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 7 |
lolphp | duskwuff | f5mbypj | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 7 |
lolphp | Targren | f5mllqb | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 7 |
lolphp | AyrA_ch | f5msbfq | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 6 |
lolphp | Mark_Messa | f5mdmrv | <|soss|><|sot|>PHP setcookies expires<|eot|><|sost|>According to the [PHP manual](https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-notes) about `setcookie`:
> _Common Pitfalls_:
>
> [...]
>
> If the value argument is an empty string, or FALSE, and all other arguments match a previous ca... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.