subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
lolphp | MiyatodukenMiyamaap | ck03yt3 | <|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|sor|>I don't know if the fact that SimpleXMLElement is a [documented special case](http://php.net/manual/en/language.types.boolean.php#language.types.boolean.casting) makes it more or less perplexing.
... | 11 |
lolphp | MiyatodukenMiyamaap | ck01dvl | <|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|sor|>I don't know if the fact that SimpleXMLElement is a [documented special case](http://php.net/manual/en/language.types.boolean.php#language.types.boolean.casting) makes it more or less perplexing.
... | 10 |
lolphp | BufferUnderpants | ck0dmtv | <|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|sor|>I don't know if the fact that SimpleXMLElement is a [documented special case](http://php.net/manual/en/language.types.boolean.php#language.types.boolean.casting) makes it more or less perplexing.
... | 9 |
lolphp | himdel | ck02ul4 | <|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|sor|>Ooh, I'd love a way to make specific objects falsy, but no, of course it being PHP, it must be a special case. <|eor|><|eols|><|endoftext|> | 6 |
lolphp | andsens | ck0ee2c | <|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|sor|>I'm pretty sure it's because `SimpleXMLElement` casts `__toString()` which returns the content of the node and since the node is empty, it returns false. stdClass doesn't have a `__toString`, so i... | 5 |
lolphp | gearvOsh | ck0egyu | <|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|sor|>I'm pretty sure it's because `SimpleXMLElement` casts `__toString()` which returns the content of the node and since the node is empty, it returns false. stdClass doesn't have a `__toString`, so i... | 5 |
lolphp | andsens | ck0ezou | <|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|sor|>I'm pretty sure it's because `SimpleXMLElement` casts `__toString()` which returns the content of the node and since the node is empty, it returns false. stdClass doesn't have a `__toString`, so i... | 5 |
lolphp | CoenJacobs | 2df8v5 | <|sols|><|sot|>Wonder how many people have run phpinfo in 3v4l.org already...<|eot|><|sol|>http://3v4l.org/1l50A<|eol|><|eols|><|endoftext|> | 22 |
lolphp | DoctorWaluigiTime | cjoyzot | <|sols|><|sot|>Wonder how many people have run phpinfo in 3v4l.org already...<|eot|><|sol|>http://3v4l.org/1l50A<|eol|><|sor|>Even though it has a mechanism in place to detect and stop abuse, you'd think `phpinfo()` would be a blacklisted function.<|eor|><|eols|><|endoftext|> | 9 |
lolphp | shitcanz | m3bwl7 | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 22 |
lolphp | tdammers | gqo0rtd | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 30 |
lolphp | ZiggyTheHamster | gqo7q8w | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 22 |
lolphp | sproingie | gqplo5m | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 19 |
lolphp | cangelis | gqoci32 | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 17 |
lolphp | stfcfanhazz | gqohn66 | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 13 |
lolphp | Dr_Azrael_Tod | gqomjmk | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 10 |
lolphp | stfcfanhazz | gqokrm8 | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 10 |
lolphp | cangelis | gqoito9 | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 9 |
lolphp | elcapitanoooo | gqqgskn | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 8 |
lolphp | stfcfanhazz | gqoknkj | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 8 |
lolphp | cq73 | gqp6dgy | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 7 |
lolphp | elcapitanoooo | gqok7qf | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 6 |
lolphp | merreborn | gqpyzfb | <|soss|><|sot|>PHP fibers<|eot|><|sost|>Proposal:
https://wiki.php.net/rfc/fibers
The devs are now planning to add builtin fiber support for PHP, so that async code can be done "natively".
LOL #1 PHP execution model is not compatible for anything async, it starts and dies instantly. Theres zero benefits on waiting ... | 6 |
lolphp | aleczapka | itsn91 | <|sols|><|sot|>DateTime::createFromFormat('lol', microtime(maybe))<|eot|><|sol|>https://3v4l.org/9PN0m<|eol|><|eols|><|endoftext|> | 22 |
lolphp | aleczapka | g5ghazl | <|sols|><|sot|>DateTime::createFromFormat('lol', microtime(maybe))<|eot|><|sol|>https://3v4l.org/9PN0m<|eol|><|soopr|>In those rare cases when `microtime(true)` call will return `SOME_UNIX_TIMESTAMP.000000)` where microseconds are set to 0 (ye can really happen) cause that was actually the ...time.
After that its eas... | 6 |
lolphp | elcapitanoooo | g5i9dqy | <|sols|><|sot|>DateTime::createFromFormat('lol', microtime(maybe))<|eot|><|sol|>https://3v4l.org/9PN0m<|eol|><|soopr|>In those rare cases when `microtime(true)` call will return `SOME_UNIX_TIMESTAMP.000000)` where microseconds are set to 0 (ye can really happen) cause that was actually the ...time.
After that its eas... | 6 |
lolphp | Jinxuan | gsz56h | <|soss|><|sot|>number_format allows 2 arguments or 4 arguments, but disallows 3 arguments<|eot|><|sost|>As the document says [https://www.php.net/manual/en/function.number-format.php](https://www.php.net/manual/en/function.number-format.php), the function is like
```
number_format ( float $number [, int $decimals = 0... | 21 |
lolphp | maxgee | fs9hgen | <|soss|><|sot|>number_format allows 2 arguments or 4 arguments, but disallows 3 arguments<|eot|><|sost|>As the document says [https://www.php.net/manual/en/function.number-format.php](https://www.php.net/manual/en/function.number-format.php), the function is like
```
number_format ( float $number [, int $decimals = 0... | 11 |
lolphp | nplus | 6gt51x | <|sols|><|sot|>A Comic About PHP Good Parts<|eot|><|sol|>https://turnoff.us/geek/php-good-parts/<|eol|><|eols|><|endoftext|> | 18 |
lolphp | seriouslulz | 4wpaek | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|eols|><|endoftext|> | 22 |
lolphp | poop-trap | d691din | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>One thing that php got right is that it collected all these devs in one place so that the rest of us don't have to deal with them.<|eor|><|eols|><|en... | 43 |
lolphp | Bl00dsoul | d69gy6q | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|eols|><|endoftext|> | 23 |
lolphp | BufferUnderpants | d69iv92 | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|sor|>I agree. It's the o... | 13 |
lolphp | seriouslulz | d69io41 | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 10 |
lolphp | vytah | d69opqa | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 9 |
lolphp | seriouslulz | d69pp5g | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 8 |
lolphp | seriouslulz | d6a6hzr | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 7 |
lolphp | n0t0ri0us9 | d68zl05 | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>Get out.<|eor|><|sor|>No. Why don't you get out? We are here to make fun of everything Php.
If you are not Ok with it. Don't come here. Simple!<|eor... | 6 |
lolphp | coredumperror | d6si0u3 | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 6 |
lolphp | smog_alado | d6a0awt | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 5 |
lolphp | carlos_vini | d6dai82 | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 5 |
lolphp | seriouslulz | d6ixv3t | <|sols|><|sot|>More like lolphpdevs, but this fucking thread<|eot|><|sol|>https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67ie00<|eol|><|sor|>I don't get it?
not overloading the + operator for string concat was indeed a good idea. just look at javascript..<|eor|><|soopr|>> It's ridiculous... | 5 |
lolphp | pilif | 4gduzm | <|soss|><|sot|>Using traits enforces declaration order<|eot|><|sost|>Normally, in PHP, you're free to instantiate a subclass of a class that's not defined yet. Like this: https://3v4l.org/CXjt8
But the moment your subclass uses a trait, that's not true any more: https://3v4l.org/BXALN
Of course that's working as inte... | 21 |
lolphp | garagedragon | d2gvbp5 | <|soss|><|sot|>Using traits enforces declaration order<|eot|><|sost|>Normally, in PHP, you're free to instantiate a subclass of a class that's not defined yet. Like this: https://3v4l.org/CXjt8
But the moment your subclass uses a trait, that's not true any more: https://3v4l.org/BXALN
Of course that's working as inte... | 17 |
lolphp | arturaz | d2hjxd8 | <|soss|><|sot|>Using traits enforces declaration order<|eot|><|sost|>Normally, in PHP, you're free to instantiate a subclass of a class that's not defined yet. Like this: https://3v4l.org/CXjt8
But the moment your subclass uses a trait, that's not true any more: https://3v4l.org/BXALN
Of course that's working as inte... | 14 |
lolphp | pilif | d2hk4ty | <|soss|><|sot|>Using traits enforces declaration order<|eot|><|sost|>Normally, in PHP, you're free to instantiate a subclass of a class that's not defined yet. Like this: https://3v4l.org/CXjt8
But the moment your subclass uses a trait, that's not true any more: https://3v4l.org/BXALN
Of course that's working as inte... | 7 |
lolphp | pilif | d2i57ob | <|soss|><|sot|>Using traits enforces declaration order<|eot|><|sost|>Normally, in PHP, you're free to instantiate a subclass of a class that's not defined yet. Like this: https://3v4l.org/CXjt8
But the moment your subclass uses a trait, that's not true any more: https://3v4l.org/BXALN
Of course that's working as inte... | 6 |
lolphp | nic0nic | 345qcw | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|eols|><|endoftext|> | 17 |
lolphp | McGlockenshire | cqrhvxl | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>Anonymous functions are just like normal functions when it comes to not inheri... | 51 |
lolphp | cite-reader | cqrqwf9 | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>Anonymous functions are just like normal functions when it comes to not inheri... | 28 |
lolphp | barubary | cqrlxob | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>This is a consequence of PHP not having variable declarations (and every varia... | 16 |
lolphp | scshunt | cqrqate | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>Anonymous functions are just like normal functions when it comes to not inheri... | 16 |
lolphp | cite-reader | cqro7tp | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>Anonymous functions are just like normal functions when it comes to not inheri... | 13 |
lolphp | cite-reader | cqro28g | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>This is a consequence of PHP not having variable declarations (and every varia... | 13 |
lolphp | Dworgi | cqrssyh | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>Anonymous functions are just like normal functions when it comes to not inheri... | 12 |
lolphp | __constructor | cqubek2 | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>This is a consequence of PHP not having variable declarations (and every varia... | 7 |
lolphp | Drainedsoul | cqsda3o | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>Anonymous functions are just like normal functions when it comes to not inheri... | 7 |
lolphp | __constructor | cqubciu | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>Why would you want PHP to implement javascript-style scope pollution? This is ... | 5 |
lolphp | Synes_Godt_Om | cqrn3dn | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>OP is so wrong on this that it hurts. This is definitely not LOLPHP but LOLnic... | 5 |
lolphp | barubary | cqrul47 | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>This is a consequence of PHP not having variable declarations (and every varia... | 5 |
lolphp | barubary | cqus73n | <|sols|><|sot|>It would have been so strange if PHP guys would have implemented a thing "normally" like all others... (x-post from /r/programming)<|eot|><|sol|>http://stackoverflow.com/questions/6543419/php-closure-scope-problem<|eol|><|sor|>This is a consequence of PHP not having variable declarations (and every varia... | 5 |
lolphp | Serialk | 1i57ve | <|soss|><|sot|>Assignment has a higher precedence than boolean operators<|eot|><|sost|>Well. Yeah.
php > $z = false or true;
php > var_dump($z);
bool(false)
php > $z = true and false;
php > var_dump($z);
bool(true)
Actually, "or" and "and" are like "||" and "&&", but with an absurd precedence.... | 22 |
lolphp | phoshi | cb15gvk | <|soss|><|sot|>Assignment has a higher precedence than boolean operators<|eot|><|sost|>Well. Yeah.
php > $z = false or true;
php > var_dump($z);
bool(false)
php > $z = true and false;
php > var_dump($z);
bool(true)
Actually, "or" and "and" are like "||" and "&&", but with an absurd precedence.... | 15 |
lolphp | Laugarhraun | cb150xg | <|soss|><|sot|>Assignment has a higher precedence than boolean operators<|eot|><|sost|>Well. Yeah.
php > $z = false or true;
php > var_dump($z);
bool(false)
php > $z = true and false;
php > var_dump($z);
bool(true)
Actually, "or" and "and" are like "||" and "&&", but with an absurd precedence.... | 12 |
lolphp | infinull | cb1axfd | <|soss|><|sot|>Assignment has a higher precedence than boolean operators<|eot|><|sost|>Well. Yeah.
php > $z = false or true;
php > var_dump($z);
bool(false)
php > $z = true and false;
php > var_dump($z);
bool(true)
Actually, "or" and "and" are like "||" and "&&", but with an absurd precedence.... | 12 |
lolphp | barubary | cb1p9q6 | <|soss|><|sot|>Assignment has a higher precedence than boolean operators<|eot|><|sost|>Well. Yeah.
php > $z = false or true;
php > var_dump($z);
bool(false)
php > $z = true and false;
php > var_dump($z);
bool(true)
Actually, "or" and "and" are like "||" and "&&", but with an absurd precedence.... | 10 |
lolphp | bart2019 | cb13qra | <|soss|><|sot|>Assignment has a higher precedence than boolean operators<|eot|><|sost|>Well. Yeah.
php > $z = false or true;
php > var_dump($z);
bool(false)
php > $z = true and false;
php > var_dump($z);
bool(true)
Actually, "or" and "and" are like "||" and "&&", but with an absurd precedence.... | 6 |
lolphp | wefarrell | 1fvovs | <|sols|><|sot|>import_request_variables<|eot|><|sol|>http://php.net/manual/en/function.import-request-variables.php<|eol|><|eols|><|endoftext|> | 20 |
lolphp | wefarrell | cae8uhy | <|sols|><|sot|>import_request_variables<|eot|><|sol|>http://php.net/manual/en/function.import-request-variables.php<|eol|><|soopr|>Thankfully this is removed in php 5.4, but the fact that it ever existed really makes you question the sanity of the design.<|eoopr|><|eols|><|endoftext|> | 13 |
lolphp | Rhomboid | caedq1k | <|sols|><|sot|>import_request_variables<|eot|><|sol|>http://php.net/manual/en/function.import-request-variables.php<|eol|><|sor|>`import_request_variables` was added in 4.1.0, and `register_globals` was defaulted to off in 4.2.0. (Both were deprecated in 5.3.0 and removed in 5.4.0.) From that I think we can infer tha... | 11 |
lolphp | cythrawll | caeczo8 | <|sols|><|sot|>import_request_variables<|eot|><|sol|>http://php.net/manual/en/function.import-request-variables.php<|eol|><|soopr|>Thankfully this is removed in php 5.4, but the fact that it ever existed really makes you question the sanity of the design.<|eoopr|><|sor|>Did you forget about register globals?<|eor|><|eo... | 9 |
lolphp | arand | z2d0x | <|sols|><|sot|>PHP is a fractal of bad design?
Hardly. - Dev Shed forum user says
so.<|eot|><|sol|>http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html<|eol|><|eols|><|endoftext|> | 23 |
lolphp | ealf | c636m3k | <|sols|><|sot|>PHP is a fractal of bad design?
Hardly. - Dev Shed forum user says
so.<|eot|><|sol|>http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html<|eol|><|sor|>Oh wow.
Complaint: PHP encourages XSS holes.
"Rebuttal": I don't understand how any language could do better.... | 17 |
lolphp | Legolas-the-elf | c6oqwg8 | <|sols|><|sot|>PHP is a fractal of bad design?
Hardly. - Dev Shed forum user says
so.<|eot|><|sol|>http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html<|eol|><|sor|>Sometimes I wish online forums had the age and experience level of the people involved prominently displayed. ... | 8 |
lolphp | robin-gvx | c6ao3js | <|sols|><|sot|>PHP is a fractal of bad design?
Hardly. - Dev Shed forum user says
so.<|eot|><|sol|>http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html<|eol|><|sor|>Oh my god, that's terrible. And it gets worse when that user starts replying to the Fractal author's rebuttal o... | 7 |
lolphp | nemoTheKid | c65lxkb | <|sols|><|sot|>PHP is a fractal of bad design?
Hardly. - Dev Shed forum user says
so.<|eot|><|sol|>http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html<|eol|><|sor|>I was surprised when I saw this was written last week. The guy hes arguing with is either 15 or a troll. Hes wa... | 6 |
lolphp | sumdog | c6jneye | <|sols|><|sot|>PHP is a fractal of bad design?
Hardly. - Dev Shed forum user says
so.<|eot|><|sol|>http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html<|eol|><|sor|>"OMG you critized the only language I have ever seen!!!!!!!"
> Does Python have some magical way of changing t... | 6 |
lolphp | robin-gvx | c6ao5k1 | <|sols|><|sot|>PHP is a fractal of bad design?
Hardly. - Dev Shed forum user says
so.<|eot|><|sol|>http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html<|eol|><|sor|>Oh my god, that's terrible. And it gets worse when that user starts replying to the Fractal author's rebuttal o... | 6 |
lolphp | vytah | vfysj | <|sols|><|sot|>basename() strips non-ASCII characters from beginning of a filename <|eot|><|sol|>https://bugs.php.net/bug.php?id=62119<|eol|><|eols|><|endoftext|> | 22 |
lolphp | Rhomboid | c54a2ql | <|sols|><|sot|>basename() strips non-ASCII characters from beginning of a filename <|eot|><|sol|>https://bugs.php.net/bug.php?id=62119<|eol|><|sor|>PHP's behavior is clearly strange and inconsistent, but trying to use strings that contain non-ASCII characters when your locale is "C" is also nutso. "C" locale means "I ... | 12 |
lolphp | audaxxx | c54adyz | <|sols|><|sot|>basename() strips non-ASCII characters from beginning of a filename <|eot|><|sol|>https://bugs.php.net/bug.php?id=62119<|eol|><|sor|>PHP's behavior is clearly strange and inconsistent, but trying to use strings that contain non-ASCII characters when your locale is "C" is also nutso. "C" locale means "I ... | 9 |
lolphp | audaxxx | c549j35 | <|sols|><|sot|>basename() strips non-ASCII characters from beginning of a filename <|eot|><|sol|>https://bugs.php.net/bug.php?id=62119<|eol|><|sor|>Now I want to see the explanation why this behaviour is correct and the programmer is just stupid. I am sure, Rasmus will deliver.<|eor|><|eols|><|endoftext|> | 8 |
lolphp | infinull | c54dxxd | <|sols|><|sot|>basename() strips non-ASCII characters from beginning of a filename <|eot|><|sol|>https://bugs.php.net/bug.php?id=62119<|eol|><|sor|>Weird behavior, but why would anyone ever name a file like that? I would always strip those kind of characters, or replace them with the standard "a".
Edit: FYI, I'm refer... | 5 |
lolphp | Takeoded | r2m35d | <|sols|><|sot|>comments "on Function Overloading Feature"<|eot|><|sol|>https://www.php.net/manual/en/mbstring.overload.php<|eol|><|eols|><|endoftext|> | 20 |
lolphp | sproingie | hm5lift | <|sols|><|sot|>comments "on Function Overloading Feature"<|eot|><|sol|>https://www.php.net/manual/en/mbstring.overload.php<|eol|><|sor|>That very last comment ... shudder.
TIL PHP has a multibyte-by-default setting. It looks like it doesn't give you any way to get back to byte-wise operations when you need them tho. ... | 10 |
lolphp | Takeoded | hm5mifj | <|sols|><|sot|>comments "on Function Overloading Feature"<|eot|><|sol|>https://www.php.net/manual/en/mbstring.overload.php<|eol|><|sor|>That very last comment ... shudder.
TIL PHP has a multibyte-by-default setting. It looks like it doesn't give you any way to get back to byte-wise operations when you need them tho. ... | 8 |
lolphp | Takeoded | hm5ucxf | <|sols|><|sot|>comments "on Function Overloading Feature"<|eot|><|sol|>https://www.php.net/manual/en/mbstring.overload.php<|eol|><|sor|>That very last comment ... shudder.
TIL PHP has a multibyte-by-default setting. It looks like it doesn't give you any way to get back to byte-wise operations when you need them tho. ... | 8 |
lolphp | chengannur | mbi1qw | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|eols|><|endoftext|> | 22 |
lolphp | elcapitanoooo | gry06p1 | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|sor|>Damn. Looks like they wont even try to have builtin unicode support. How about deprecate ALL the builtin oddities (iconv, mb_functions etc etc) and remove them in PHP9 and introduce real builtin unicode f... | 15 |
lolphp | duskwuff | grztwt9 | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|sor|>Damn. Looks like they wont even try to have builtin unicode support. How about deprecate ALL the builtin oddities (iconv, mb_functions etc etc) and remove them in PHP9 and introduce real builtin unicode f... | 11 |
lolphp | Muzer0 | gs1vhft | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|sor|>Damn. Looks like they wont even try to have builtin unicode support. How about deprecate ALL the builtin oddities (iconv, mb_functions etc etc) and remove them in PHP9 and introduce real builtin unicode f... | 9 |
lolphp | svtguy88 | gs0eed1 | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|sor|>Why on earth do people still use and defend this so called language<|eor|><|sor|>Because market share...
People will defend whatever language is making them a living.<|eor|><|eols|><|endoftext|> | 9 |
lolphp | SockPants | grywefz | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|sor|>Damn. Looks like they wont even try to have builtin unicode support. How about deprecate ALL the builtin oddities (iconv, mb_functions etc etc) and remove them in PHP9 and introduce real builtin unicode f... | 7 |
lolphp | ocurero | gryfgju | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|sor|>PHP in a nutshell.<|eor|><|eols|><|endoftext|> | 6 |
lolphp | SaltineAmerican_1970 | grylk6w | <|sols|><|sot|>Another one of those epic discussions.<|eot|><|sol|>https://externals.io/message/113645<|eol|><|sor|>Damn. Looks like they wont even try to have builtin unicode support. How about deprecate ALL the builtin oddities (iconv, mb_functions etc etc) and remove them in PHP9 and introduce real builtin unicode f... | 6 |
lolphp | Mark_Messa | dm4244 | <|soss|><|sot|>PHP Functions: more arguments than expected<|eot|><|sost|>PHP code1:
function f() {return 'hello world!';}
echo f().'<br>';
echo f(123).'<br>';
echo f(123, 'foo').'<br>';
Output:
hello world!
hello world!
hello world!
PHP code2:
function g(int $x) {return... | 19 |
lolphp | blipblop_ | f4wpamb | <|soss|><|sot|>PHP Functions: more arguments than expected<|eot|><|sost|>PHP code1:
function f() {return 'hello world!';}
echo f().'<br>';
echo f(123).'<br>';
echo f(123, 'foo').'<br>';
Output:
hello world!
hello world!
hello world!
PHP code2:
function g(int $x) {return... | 13 |
lolphp | Mark_Messa | f4wxeup | <|soss|><|sot|>PHP Functions: more arguments than expected<|eot|><|sost|>PHP code1:
function f() {return 'hello world!';}
echo f().'<br>';
echo f(123).'<br>';
echo f(123, 'foo').'<br>';
Output:
hello world!
hello world!
hello world!
PHP code2:
function g(int $x) {return... | 8 |
lolphp | Mark_Messa | f4y8rln | <|soss|><|sot|>PHP Functions: more arguments than expected<|eot|><|sost|>PHP code1:
function f() {return 'hello world!';}
echo f().'<br>';
echo f(123).'<br>';
echo f(123, 'foo').'<br>';
Output:
hello world!
hello world!
hello world!
PHP code2:
function g(int $x) {return... | 7 |
lolphp | Mark_Messa | f4xhlex | <|soss|><|sot|>PHP Functions: more arguments than expected<|eot|><|sost|>PHP code1:
function f() {return 'hello world!';}
echo f().'<br>';
echo f(123).'<br>';
echo f(123, 'foo').'<br>';
Output:
hello world!
hello world!
hello world!
PHP code2:
function g(int $x) {return... | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.