subreddit stringclasses 7
values | author stringlengths 3 20 | id stringlengths 5 7 | content stringlengths 67 30.4k | score int64 0 140k |
|---|---|---|---|---|
lolphp | EleventyTwatWaffles | e0dlk0c | <|sols|><|sot|>PHP as a profession<|eot|><|sol|>http://php.net/manual/en/function.delete.php<|eol|><|sor|>Okay, what am I missing here?
Woosh?<|eor|><|sor|>Probably the fact that they hade to add a page with a dummy delete method, becuase of <PHP dev><|eor|><|sor|>Sounds like bitching for bitchings sake, or karma. <|e... | 28 |
lolphp | cleeder | e0dnzjp | <|sols|><|sot|>PHP as a profession<|eot|><|sol|>http://php.net/manual/en/function.delete.php<|eol|><|sor|>Okay, what am I missing here?
Woosh?<|eor|><|sor|>Probably the fact that they hade to add a page with a dummy delete method, becuase of <PHP dev><|eor|><|sor|>Eeeeeh. I could not care less on this, honestly. It's ... | 23 |
lolphp | notaaron | e0dm6nm | <|sols|><|sot|>PHP as a profession<|eot|><|sol|>http://php.net/manual/en/function.delete.php<|eol|><|sor|>Tbh, I dont think this is too bad.<|eor|><|eols|><|endoftext|> | 22 |
lolphp | cleeder | e0e4jkm | <|sols|><|sot|>PHP as a profession<|eot|><|sol|>http://php.net/manual/en/function.delete.php<|eol|><|sor|>We probably will get a real_delete soon. Or real_print_r that wont actually cause side-effects. Another gem for the taking...<|eor|><|sor|>I'm really tired of hearing this. This isn't an lolphp. The `mysql_real_esc... | 22 |
lolphp | cleeder | e0dkfe9 | <|sols|><|sot|>PHP as a profession<|eot|><|sol|>http://php.net/manual/en/function.delete.php<|eol|><|sor|>Okay, what am I missing here?
Woosh?<|eor|><|eols|><|endoftext|> | 16 |
lolphp | TorbenKoehn | e0ho1fy | <|sols|><|sot|>PHP as a profession<|eot|><|sol|>http://php.net/manual/en/function.delete.php<|eol|><|sor|>We probably will get a real_delete soon. Or real_print_r that wont actually cause side-effects. Another gem for the taking...<|eor|><|sor|>I'm really tired of hearing this. This isn't an lolphp. The `mysql_real_esc... | 6 |
lolphp | sickjobpeople | 3vzwvw | <|sols|><|sot|>The controversial PSR-6 has passed. Disregarding significant push-back from the community and largest projects.<|eot|><|sol|>https://groups.google.com/d/msg/php-fig/dSw5IhpKJ1g/WqITQoNACAAJ<|eol|><|eols|><|endoftext|> | 2 |
lolphp | RainOnYourTirade | 3kcgjv | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|eols|><|endoftext|> | 2 |
lolphp | vytah | cuwmwc8 | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|sor|>This is actually not *that* bad:
1. The first case obviously makes sense, no doubts about it
2. The second one does too: when you join a list of strings with a separator and the list has one element, the result will have no separators... | 34 |
lolphp | tdammers | cuwkb5z | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|soopr|>To reference the documentation:
> Returns an array of strings created by splitting the string parameter on boundaries formed by the delimiter.
> If delimiter is an empty string (""), explode() will return FALSE. If delimiter contain... | 33 |
lolphp | tdammers | cuwkb17 | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|sor|>Well. It's called `explode()` for a reason. If it made sense, they'd have called it `split()` :-)<|eor|><|sor|>They didn't call it `split`, because they already had a lot of 5-letter function names, so that would have been a performance... | 31 |
lolphp | andsens | cuwhzay | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|sor|>Well. It's called `explode()` for a reason. If it made sense, they'd have called it `split()` :-)<|eor|><|eols|><|endoftext|> | 21 |
lolphp | RainOnYourTirade | cuwelnp | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|soopr|>To reference the documentation:
> Returns an array of strings created by splitting the string parameter on boundaries formed by the delimiter.
> If delimiter is an empty string (""), explode() will return FALSE. If delimiter contain... | 20 |
lolphp | tdammers | cuwm2ii | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|sor|>Well. It's called `explode()` for a reason. If it made sense, they'd have called it `split()` :-)<|eor|><|sor|>They didn't call it `split`, because they already had a lot of 5-letter function names, so that would have been a performance... | 17 |
lolphp | expugnator3000 | cuwkw4r | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|sor|>Well. It's called `explode()` for a reason. If it made sense, they'd have called it `split()` :-)<|eor|><|sor|>They didn't call it `split`, because they already had a lot of 5-letter function names, so that would have been a performance... | 16 |
lolphp | Artemis2 | cuwk6x6 | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|soopr|>To reference the documentation:
> Returns an array of strings created by splitting the string parameter on boundaries formed by the delimiter.
> If delimiter is an empty string (""), explode() will return FALSE. If delimiter contain... | 12 |
lolphp | Banane9 | cuwkap4 | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|soopr|>To reference the documentation:
> Returns an array of strings created by splitting the string parameter on boundaries formed by the delimiter.
> If delimiter is an empty string (""), explode() will return FALSE. If delimiter contain... | 11 |
lolphp | ReversedGif | cux123p | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|sor|>Pretty much all of this makes sense. You should feel ashamed of yourself.<|eor|><|eols|><|endoftext|> | 7 |
lolphp | polish_niceguy | cuwpew5 | <|sols|><|sot|>explode() is a mess<|eot|><|sol|>https://3v4l.org/eKMav<|eol|><|soopr|>To reference the documentation:
> Returns an array of strings created by splitting the string parameter on boundaries formed by the delimiter.
> If delimiter is an empty string (""), explode() will return FALSE. If delimiter contain... | 6 |
lolphp | jamwaffles | 1q3byu | <|sols|><|sot|>PHP is the only language that will bankrupt Microsoft<|eot|><|sol|>https://hackerone.com/ibb<|eol|><|eols|><|endoftext|> | 4 |
lolphp | BufferUnderpants | cd9a9yd | <|sols|><|sot|>PHP is the only language that will bankrupt Microsoft<|eot|><|sol|>https://hackerone.com/ibb<|eol|><|sor|>Hahaha, PHP is so vulnerable that the bug bounties will cost Microsoft billions of dollars.
Seriously, unless the post actually has something funny about PHP, why the fuck would you post it here? Mi... | 6 |
lolphp | BufferUnderpants | cd8wgww | <|sols|><|sot|>PHP is the only language that will bankrupt Microsoft<|eot|><|sol|>https://hackerone.com/ibb<|eol|><|sor|>Hahaha, PHP is so vulnerable that the bug bounties will cost Microsoft billions of dollars.
Seriously, unless the post actually has something funny about PHP, why the fuck would you post it here? Mi... | 6 |
lolphp | cythrawll | ww2bx | <|sols|><|sot|>CodeAngel.org PHP frameworks are obsolete<|eot|><|sol|>http://codeangel.org/articles/php-frameworks-are-obsolete.html<|eol|><|eols|><|endoftext|> | 2 |
lolphp | nakudoh | qzdbi | <|sols|><|sot|>2037 latest year???<|eot|><|sol|>https://bugs.php.net/bug.php?id=7103<|eol|><|eols|><|endoftext|> | 3 |
lolphp | RobOplawar | c41nrlo | <|sols|><|sot|>2037 latest year???<|eot|><|sol|>https://bugs.php.net/bug.php?id=7103<|eol|><|sor|>This is a well known problem with using 32 bit unix timestamps:
http://en.m.wikipedia.org/wiki/Year_2038_problem
It's not unique to PHP. <|eor|><|eols|><|endoftext|> | 12 |
lolphp | nakudoh | c41nkx4 | <|sols|><|sot|>2037 latest year???<|eot|><|sol|>https://bugs.php.net/bug.php?id=7103<|eol|><|soopr|>So I had to parse a X.509 certificate that is valid until 2040.
Sorry, not possible in PHP.<|eoopr|><|eols|><|endoftext|> | 8 |
lolphp | ealf | d6by1 | <|soss|><|sot|>$foo ? new A() : new B(); class A extends B {} class B {}<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 2 |
lolphp | ealf | cjia1 | <|soss|><|sot|>If __toString() throws an exception, you (a) don't get to catch it, (b) don't get a stack trace, and (c) it's reported as being on LINE 0.<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 2 |
lolphp | ealf | cgjz7 | <|soss|><|sot|>new Foo()->bar() doesn't parse<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 2 |
lolphp | ealf | ccyu4 | <|soss|><|sot|>$x = '_SERVER'; print_r($$x);<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 2 |
lolphp | ealf | cat6w | <|soss|><|sot|>a?b:c?d:e means (a?b:c)?d:e<|eot|><|sost|>... because we don't understand what associativity is but we write parsers anyway<|eost|><|eoss|><|endoftext|> | 2 |
lolphp | ealf | cat67 | <|soss|><|sot|>08 === 0<|eot|><|sost|>... because noone checked the return value of `atol()`<|eost|><|eoss|><|endoftext|> | 2 |
lolphp | Persism | s9yob9 | <|sols|><|sot|>How I got foiled by PHP's deceptive Frankenstein "dictionary or list" array and broke a production system<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|eols|><|endoftext|> | 1 |
lolphp | Altreus | htq62be | <|sols|><|sot|>How I got foiled by PHP's deceptive Frankenstein "dictionary or list" array and broke a production system<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>PHP believes that numbers are numeric, which is foolish in the extreme. The textbook new-programmer mistake is to create a n... | 13 |
lolphp | Altreus | htq9pd2 | <|sols|><|sot|>How I got foiled by PHP's deceptive Frankenstein "dictionary or list" array and broke a production system<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>PHP believes that numbers are numeric, which is foolish in the extreme. The textbook new-programmer mistake is to create a n... | 10 |
lolphp | loptr | htr3bje | <|sols|><|sot|>How I got foiled by PHP's deceptive Frankenstein "dictionary or list" array and broke a production system<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>PHP believes that numbers are numeric, which is foolish in the extreme. The textbook new-programmer mistake is to create a n... | 7 |
lolphp | vytah | htsplhw | <|sols|><|sot|>How I got foiled by PHP's deceptive Frankenstein "dictionary or list" array and broke a production system<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>PHP believes that numbers are numeric, which is foolish in the extreme. The textbook new-programmer mistake is to create a n... | 5 |
lolphp | boxhacker | htq7lqc | <|sols|><|sot|>How I got foiled by PHP's deceptive Frankenstein "dictionary or list" array and broke a production system<|eot|><|sol|>https://vazaha.blog/en/9/php-frankenstein-arrays<|eol|><|sor|>PHP believes that numbers are numeric, which is foolish in the extreme. The textbook new-programmer mistake is to create a n... | 5 |
lolphp | Green-Look | epk1lt | <|soss|><|sot|>Instead of complaining about PHP. Why not use Laravel?<|eot|><|sost|>It solves most of what is wrong with PHP, instead of easily solving your problems, you enjoy bashing PHP with your elitist attitude. Grow up.<|eost|><|eoss|><|endoftext|> | 1 |
lolphp | tdammers | fejy9o3 | <|soss|><|sot|>Instead of complaining about PHP. Why not use Laravel?<|eot|><|sost|>It solves most of what is wrong with PHP, instead of easily solving your problems, you enjoy bashing PHP with your elitist attitude. Grow up.<|eost|><|sor|>No it doesn't. It's a laudeable effort, but it doesn't fix what is wrong with PH... | 22 |
lolphp | Perdouille | fekbat3 | <|soss|><|sot|>Instead of complaining about PHP. Why not use Laravel?<|eot|><|sost|>It solves most of what is wrong with PHP, instead of easily solving your problems, you enjoy bashing PHP with your elitist attitude. Grow up.<|eost|><|sor|>I follow LolPHP but I'm a PHP dev. It's useful to learn quirks of the language i... | 21 |
lolphp | sproingie | felrxg5 | <|soss|><|sot|>Instead of complaining about PHP. Why not use Laravel?<|eot|><|sost|>It solves most of what is wrong with PHP, instead of easily solving your problems, you enjoy bashing PHP with your elitist attitude. Grow up.<|eost|><|sor|>Laravel's use of magic methods _adds_ all kinds of WTFs to PHP development. To ... | 16 |
lolphp | barubary | feqq6k5 | <|soss|><|sot|>Instead of complaining about PHP. Why not use Laravel?<|eot|><|sost|>It solves most of what is wrong with PHP, instead of easily solving your problems, you enjoy bashing PHP with your elitist attitude. Grow up.<|eost|><|sor|>Instead of complaining about the US, why not move to Mississippi?<|eor|><|eoss|>... | 10 |
lolphp | sproingie | felt0qe | <|soss|><|sot|>Instead of complaining about PHP. Why not use Laravel?<|eot|><|sost|>It solves most of what is wrong with PHP, instead of easily solving your problems, you enjoy bashing PHP with your elitist attitude. Grow up.<|eost|><|sor|>I follow LolPHP but I'm a PHP dev. It's useful to learn quirks of the language i... | 6 |
lolphp | phplovesong | c1m7tj | <|soss|><|sot|>Calling a method on StdClass always returns FATAL ERROR<|eot|><|sost|>Some sites like [lolphptherightway](https://phptherightway.com/pages/Functional-Programming.html) is trying to spread lies about first class functions. But attaching functions to stdClass is allowed, but one cant call them. Its pure lo... | 1 |
lolphp | jesseschalken | ereh2m8 | <|soss|><|sot|>Calling a method on StdClass always returns FATAL ERROR<|eot|><|sost|>Some sites like [lolphptherightway](https://phptherightway.com/pages/Functional-Programming.html) is trying to spread lies about first class functions. But attaching functions to stdClass is allowed, but one cant call them. Its pure lo... | 21 |
lolphp | ntzm_ | erefyu5 | <|soss|><|sot|>Calling a method on StdClass always returns FATAL ERROR<|eot|><|sost|>Some sites like [lolphptherightway](https://phptherightway.com/pages/Functional-Programming.html) is trying to spread lies about first class functions. But attaching functions to stdClass is allowed, but one cant call them. Its pure lo... | 7 |
lolphp | SirClueless | ere4vee | <|soss|><|sot|>Calling a method on StdClass always returns FATAL ERROR<|eot|><|sost|>Some sites like [lolphptherightway](https://phptherightway.com/pages/Functional-Programming.html) is trying to spread lies about first class functions. But attaching functions to stdClass is allowed, but one cant call them. Its pure lo... | 7 |
lolphp | jesseschalken | ergmavr | <|soss|><|sot|>Calling a method on StdClass always returns FATAL ERROR<|eot|><|sost|>Some sites like [lolphptherightway](https://phptherightway.com/pages/Functional-Programming.html) is trying to spread lies about first class functions. But attaching functions to stdClass is allowed, but one cant call them. Its pure lo... | 6 |
lolphp | bwmat | errirus | <|soss|><|sot|>Calling a method on StdClass always returns FATAL ERROR<|eot|><|sost|>Some sites like [lolphptherightway](https://phptherightway.com/pages/Functional-Programming.html) is trying to spread lies about first class functions. But attaching functions to stdClass is allowed, but one cant call them. Its pure lo... | 5 |
lolphp | TheRagingGeek | 8k4gnq | <|sols|><|sot|>Just everything about this page really.<|eot|><|sol|>http://php.net/manual/en/language.oop5.overloading.php#object.call<|eol|><|eols|><|endoftext|> | 0 |
lolphp | cleeder | dz5becn | <|sols|><|sot|>Just everything about this page really.<|eot|><|sol|>http://php.net/manual/en/language.oop5.overloading.php#object.call<|eol|><|sor|>If you're expecting any upvotes, I'mma need you to go into a bit more detail...<|eor|><|eols|><|endoftext|> | 10 |
lolphp | cleeder | dz5lboj | <|sols|><|sot|>Just everything about this page really.<|eot|><|sol|>http://php.net/manual/en/language.oop5.overloading.php#object.call<|eol|><|sor|>If you're expecting any upvotes, I'mma need you to go into a bit more detail...<|eor|><|soopr|>Magic Methods for the purpose of creating Object Oriented Overloading of func... | 8 |
lolphp | __Ephemeral | 25crp1 | <|soss|><|sot|>- Can someone explain "Wello!" to me~?<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 2 |
lolphp | gimbar | chho6nd | <|soss|><|sot|>- Can someone explain "Wello!" to me~?<|eot|><|sost|><|eost|><|sor|>http://w-ll.org/tag/wello/
I searched for some time myself and finally found it!<|eor|><|eoss|><|endoftext|> | 20 |
lolphp | dist | zzuqn | <|soss|><|sot|>Make your brain implode<|eot|><|sost|>
$array1 = array("here","we","go");
$array1[2] = 'go';
$array1[1] = 'we';
$array1[0] = 'here';
$array2 = array('here');
$array2[2] = 'go';
$array2[1] = 'we';
$array2[0] = 'here';
$str1 = implode(',',$array1);
$str2 = ... | 3 |
lolphp | muddylemon | c6980a2 | <|soss|><|sot|>Make your brain implode<|eot|><|sost|>
$array1 = array("here","we","go");
$array1[2] = 'go';
$array1[1] = 'we';
$array1[0] = 'here';
$array2 = array('here');
$array2[2] = 'go';
$array2[1] = 'we';
$array2[0] = 'here';
$str1 = implode(',',$array1);
$str2 = ... | 35 |
lolphp | huf | c6c5trt | <|soss|><|sot|>Make your brain implode<|eot|><|sost|>
$array1 = array("here","we","go");
$array1[2] = 'go';
$array1[1] = 'we';
$array1[0] = 'here';
$array2 = array('here');
$array2[2] = 'go';
$array2[1] = 'we';
$array2[0] = 'here';
$str1 = implode(',',$array1);
$str2 = ... | 7 |
lolphp | robin-gvx | c6bwd9b | <|soss|><|sot|>Make your brain implode<|eot|><|sost|>
$array1 = array("here","we","go");
$array1[2] = 'go';
$array1[1] = 'we';
$array1[0] = 'here';
$array2 = array('here');
$array2[2] = 'go';
$array2[1] = 'we';
$array2[0] = 'here';
$str1 = implode(',',$array1);
$str2 = ... | 5 |
lolphp | fieryscribe | re035 | <|sols|><|sot|>PHP 5.4.0 built-in web server DoS PoC<|eot|><|sol|>http://www.exploit-db.com/exploits/18665/<|eol|><|eols|><|endoftext|> | 1 |
lolphp | catcradle5 | oht0r | <|sols|><|sot|>PHP 5.3.8 NULL pointer bugs (DoS vulns)<|eot|><|sol|>http://www.exploit-db.com/exploits/18370<|eol|><|eols|><|endoftext|> | 1 |
lolphp | huf | n6oqk | <|soss|><|sot|>php -r 'var_dump(count(false));'<|eot|><|sost|>jesus. fuck.<|eost|><|eoss|><|endoftext|> | 1 |
lolphp | timtamboy63 | kqt41 | <|sols|><|sot|>Yay for PHP 4 backwards compatibility! (xpost)<|eot|><|sol|>http://www.reddit.com/r/PHP/comments/kqk5e/func_get_args_in_a_class_returns_the_class/<|eol|><|eols|><|endoftext|> | 1 |
lolphp | realnowhereman | hp2jx | <|sols|><|sot|>Short syntax for arrays (rejected RFC)<|eot|><|sol|>https://wiki.php.net/rfc/shortsyntaxforarrays<|eol|><|eols|><|endoftext|> | 1 |
lolphp | ealf | d6c0e | <|soss|><|sot|>if(rand()) global $x;<|eot|><|sost|>global is a statement<|eost|><|eoss|><|endoftext|> | 1 |
lolphp | ealf | cjz4j | <|soss|><|sot|>foreach(array(1,2,3,4) as $x) { switch($x) { case 3: continue; } echo $x; }<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 1 |
lolphp | ealf | cgk3d | <|soss|><|sot|>0 == 'Ffff!'<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 1 |
lolphp | ealf | cat50 | <|soss|><|sot|>$foo='hello'; if (isset($foo['bar'])) { ... }<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 1 |
lolphp | Takeoded | l6lqa4 | <|sols|><|sot|>can somebody explain why the hell shell_exec() doesn't have an `int &$return_code = null` ?<|eot|><|sol|>https://www.php.net/manual/en/function.shell-exec.php<|eol|><|eols|><|endoftext|> | 0 |
lolphp | duskwuff | gl1nwau | <|sols|><|sot|>can somebody explain why the hell shell_exec() doesn't have an `int &$return_code = null` ?<|eot|><|sol|>https://www.php.net/manual/en/function.shell-exec.php<|eol|><|sor|>Because `proc_open()` exists for more complex use cases?<|eor|><|sor|>Even exec() can give a return code. Using the wrong function is... | 19 |
lolphp | admin_rico | gl1jfr6 | <|sols|><|sot|>can somebody explain why the hell shell_exec() doesn't have an `int &$return_code = null` ?<|eot|><|sol|>https://www.php.net/manual/en/function.shell-exec.php<|eol|><|sor|>Because `proc_open()` exists for more complex use cases?<|eor|><|sor|>Even exec() can give a return code. Using the wrong function is... | 11 |
lolphp | admin_rico | gl1jaa6 | <|sols|><|sot|>can somebody explain why the hell shell_exec() doesn't have an `int &$return_code = null` ?<|eot|><|sol|>https://www.php.net/manual/en/function.shell-exec.php<|eol|><|sor|>shell_exec Execute command via shell and return the complete output as a string
Everything after and return is why<|eor|><|soopr|>>... | 9 |
lolphp | duskwuff | gl1j1z7 | <|sols|><|sot|>can somebody explain why the hell shell_exec() doesn't have an `int &$return_code = null` ?<|eot|><|sol|>https://www.php.net/manual/en/function.shell-exec.php<|eol|><|sor|>Because `proc_open()` exists for more complex use cases?<|eor|><|eols|><|endoftext|> | 8 |
lolphp | admin_rico | gl1gdkq | <|sols|><|sot|>can somebody explain why the hell shell_exec() doesn't have an `int &$return_code = null` ?<|eot|><|sol|>https://www.php.net/manual/en/function.shell-exec.php<|eol|><|sor|>shell_exec Execute command via shell and return the complete output as a string
Everything after and return is why<|eor|><|eols|><|... | 6 |
lolphp | Takeoded | gl2u9py | <|sols|><|sot|>can somebody explain why the hell shell_exec() doesn't have an `int &$return_code = null` ?<|eot|><|sol|>https://www.php.net/manual/en/function.shell-exec.php<|eol|><|sor|>Because `proc_open()` exists for more complex use cases?<|eor|><|sor|>Even exec() can give a return code. Using the wrong function is... | 5 |
lolphp | ennorehling | 63yq6d | <|soss|><|sot|>Beware of PHP7 left-to-right parsing<|eot|><|sost|>Today I learned that PHP 7 now uses an abstract syntax tree when parsing source files, and that the framework we use has a bug that's caused by code that boils down to the following.
<?php
function lolphp($foo, $bar) {
return $foo->$bar['... | 0 |
lolphp | belst | dfy29z8 | <|soss|><|sot|>Beware of PHP7 left-to-right parsing<|eot|><|sost|>Today I learned that PHP 7 now uses an abstract syntax tree when parsing source files, and that the framework we use has a bug that's caused by code that boils down to the following.
<?php
function lolphp($foo, $bar) {
return $foo->$bar['... | 19 |
lolphp | jesseschalken | dfycbs8 | <|soss|><|sot|>Beware of PHP7 left-to-right parsing<|eot|><|sost|>Today I learned that PHP 7 now uses an abstract syntax tree when parsing source files, and that the framework we use has a bug that's caused by code that boils down to the following.
<?php
function lolphp($foo, $bar) {
return $foo->$bar['... | 6 |
lolphp | smileytechguy | 4l22nk | <|sols|><|sot|>PDO showing full expanded initializer on error (constants used, default php.ini)<|eot|><|sol|>http://imgur.com/a/PI0Cc<|eol|><|eols|><|endoftext|> | 1 |
lolphp | ajmarks | 1q4e10 | <|sols|><|sot|>I found a case where PHP won't coerce<|eot|><|sol|>https://eval.in/62820<|eol|><|eols|><|endoftext|> | 0 |
lolphp | Sarcastinator | 1q0vsw | <|sols|><|sot|>Low hanging fruit: PHP datatype precision is determined by the platform.<|eot|><|sol|>http://us2.php.net/manual/en/language.types.integer.php<|eol|><|eols|><|endoftext|> | 0 |
lolphp | ajmarks | 1o2876 | <|sols|><|sot|>vBulletin lets just anybody make a new admin account<|eot|><|sol|>http://www.net-security.org/secworld.php?id=15743<|eol|><|eols|><|endoftext|> | 0 |
lolphp | nick_danger | cco5sfn | <|sols|><|sot|>vBulletin lets just anybody make a new admin account<|eot|><|sol|>http://www.net-security.org/secworld.php?id=15743<|eol|><|sor|>So how is this a WTF with PHP? All I see is a system that has a vulnerability that can be exploited, and that some of the attack tools are written in PHP. So? Any clueless m... | 11 |
lolphp | InsaneWookie | 1ahnf9 | <|soss|><|sot|>Guess what getting a sub string of an empty string is?<|eot|><|sost|>var_dump(substr("", 0, 1));
> bool(false)
Edit:
What I made completely unclear is that, to me, this should return an empty string (like mb_substr()). Or at least be consistant<|eost|><|eoss|><|endoftext|> | 0 |
lolphp | n1c0_ds | 13m9kd | <|soss|><|sot|>The time-travelling code<|eot|><|sost|>This happened a year ago, so I am typing this from memory.
A while ago, I had a very simple PHP script that, among other things, calculated the interval between to dates. Instead of using ticks, I tried the newfangled DateTime class.
For some reason, one of my cal... | 0 |
lolphp | throwaway-o | pg0x6 | <|soss|><|sot|>T_PAAMAYIM_NEKUDOTAYIM<|eot|><|sost|>Need anyone say more? :-)<|eost|><|eoss|><|endoftext|> | 0 |
lolphp | ealf | m5zq4 | <|sols|><|sot|>Guess what substr('foo', 3) is.<|eot|><|sol|>http://php.net/substr<|eol|><|eols|><|endoftext|> | 0 |
lolphp | ealf | c2yddcu | <|sols|><|sot|>Guess what substr('foo', 3) is.<|eot|><|sol|>http://php.net/substr<|eol|><|soopr|>Off-by-one error in the most basic of string operations? I guess anyone could do that. *Document it as the correct behavior?* That's PHP.<|eoopr|><|eols|><|endoftext|> | 5 |
lolphp | bgeron | c2yhtwk | <|sols|><|sot|>Guess what substr('foo', 3) is.<|eot|><|sol|>http://php.net/substr<|eol|><|sor|>>`<?php var_dump(substr('foo', 3)) ?>` _`bool(false)`_
What's strange about this? Character index 3 doesn't exist, if you count from zero. Also in Python, `'foo'[3:]` = `''`.
<|eor|><|soopr|>Character index 3 doesn't exist,... | 5 |
lolphp | throwaway-o | j32h7 | <|sols|><|sot|>I wonder what kind of software would make people behave as pointed out here... (*chuckle*)<|eot|><|sol|>http://lwn.net/Articles/452278/<|eol|><|eols|><|endoftext|> | 0 |
lolphp | ealf | g2woz | <|soss|><|sot|>curl_setopt(CURLOPT_POSTFIELDS, array('message' => $m)) reads a file from the local file system if $m starts with '@'<|eot|><|sost|>Use http_build_query if you want the sane behavior.
EDIT: oh wow, http_build_query takes a 'separator' argument so you can pass '&' as the separator. I am not able rig... | 0 |
lolphp | ealf | dymah | <|soss|><|sot|>list($x[0],$x[2],$x[1])=array('A','B','C'); echo join(",", $x); // try it<|eot|><|sost|><|eost|><|eoss|><|endoftext|> | 0 |
lolphp | sproingie | dngi0q | <|soss|><|sot|>PSR-11 Container Interface<|eot|><|sost|>So I find out that PHP has a common specification for Dependency Injection, namely [PSR-11](https://www.php-fig.org/psr/psr-11/). Cool, that means various DI implementations can interoperate, so a bespoke framework could swap containers like PHP-DI, Symfony, or L... | 0 |
lolphp | SaltineAmerican_1970 | f5bdhy9 | <|soss|><|sot|>PSR-11 Container Interface<|eot|><|sost|>So I find out that PHP has a common specification for Dependency Injection, namely [PSR-11](https://www.php-fig.org/psr/psr-11/). Cool, that means various DI implementations can interoperate, so a bespoke framework could swap containers like PHP-DI, Symfony, or L... | 15 |
lolphp | TinStingray | f5d0qza | <|soss|><|sot|>PSR-11 Container Interface<|eot|><|sost|>So I find out that PHP has a common specification for Dependency Injection, namely [PSR-11](https://www.php-fig.org/psr/psr-11/). Cool, that means various DI implementations can interoperate, so a bespoke framework could swap containers like PHP-DI, Symfony, or L... | 15 |
lolphp | kokx | f5br9ks | <|soss|><|sot|>PSR-11 Container Interface<|eot|><|sost|>So I find out that PHP has a common specification for Dependency Injection, namely [PSR-11](https://www.php-fig.org/psr/psr-11/). Cool, that means various DI implementations can interoperate, so a bespoke framework could swap containers like PHP-DI, Symfony, or L... | 11 |
lolphp | feketegy | cofcx2 | <|sols|><|sot|>Making the language dynamically and strictly typed at the same time. Its a proposal for now.<|eot|><|sol|>https://wiki.php.net/pplusplus/faq<|eol|><|eols|><|endoftext|> | 0 |
lolphp | Takeoded | 9xyhlj | <|sols|><|sot|>C's strlen() ftw<|eot|><|sol|>http://php.net/manual/en/sqlite3.escapestring.php<|eol|><|eols|><|endoftext|> | 0 |
lolphp | ezylot | e9wxl7m | <|sols|><|sot|>C's strlen() ftw<|eot|><|sol|>http://php.net/manual/en/sqlite3.escapestring.php<|eol|><|sor|>Okay....what am I missing?<|eor|><|soopr|>> Warning
This function is not (yet) binary safe!
>>To properly handle BLOB fields which may contain NUL characters, use SQLite3Stmt::bindParam() instead.
<|eoopr|><|so... | 19 |
lolphp | cleeder | e9wkznt | <|sols|><|sot|>C's strlen() ftw<|eot|><|sol|>http://php.net/manual/en/sqlite3.escapestring.php<|eol|><|sor|>Okay....what am I missing?<|eor|><|eols|><|endoftext|> | 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.