subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
lolphp
notian
e9xhx9l
<|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|>here's my problem: <?php function my_retarded_escape(string $str): string { $parts = explode("\00", $str); $parts = array_map([ ...
12
lolphp
erig
e9xcmt9
<|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...
7
lolphp
shitcanz
8el49p
<|sols|><|sot|>They made fun of PHP, now lets bash node as a retaliation<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/8ed9tt/used_php_in_a_hackathon_was_made_fun_of_and_it/<|eol|><|eols|><|endoftext|>
0
lolphp
human_bacon
dxw3tme
<|sols|><|sot|>They made fun of PHP, now lets bash node as a retaliation<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/8ed9tt/used_php_in_a_hackathon_was_made_fun_of_and_it/<|eol|><|sor|>As much as I hate PHP, you cannot judge a developer's ability simple because they choose to use a certain tool. I know some very...
30
lolphp
JiminP
dxw5zzl
<|sols|><|sot|>They made fun of PHP, now lets bash node as a retaliation<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/8ed9tt/used_php_in_a_hackathon_was_made_fun_of_and_it/<|eol|><|sor|>TBH IMHO PHP is not a bad language for *quickly prototyping* something, so it is a sensible choice, especially so considering th...
13
lolphp
polish_niceguy
1yvt2t
<|soss|><|sot|>What's the deal with current php.net logo?<|eot|><|sost|>Is it some internal joke, Don Quijote reference or simply the current status of PHP? [Mirror](http://i.imgur.com/AusAQHR.gif)<|eost|><|eoss|><|endoftext|>
0
lolphp
jamwaffles
1n8rww
<|soss|><|sot|>This is an array. Do stuff with it. No? Fine. Sudo do stuff with it.<|eot|><|sost|>I ran into an interesting little fuck up with PHP's implicit typing today: $iWannaUseThePikey = array( // Look ma, it's an array 'foo' => '1', 'bar' => '2', 'baz' => '3', 'zip' => '1'); // This throws type...
0
lolphp
ealf
1mxrwx
<|sols|><|sot|>array_product() returns the product of the values in an array. Guess what it returns if the array is empty.<|eot|><|sol|>http://php.net/array_product<|eol|><|eols|><|endoftext|>
0
lolphp
infinull
ccdlyj6
<|sols|><|sot|>array_product() returns the product of the values in an array. Guess what it returns if the array is empty.<|eot|><|sol|>http://php.net/array_product<|eol|><|sor|>This actually makes perfect sense, for example `product []` in haskell is 1 (see: http://tryhaskell.org/) Product is defined "product" as red...
15
lolphp
smog_alado
ccdlv65
<|sols|><|sot|>array_product() returns the product of the values in an array. Guess what it returns if the array is empty.<|eot|><|sol|>http://php.net/array_product<|eol|><|sor|>Returning 1 as the product of the empty array makes perfect sense to me, since 1 is the neutral element for multiplication. The weird thing is...
10
lolphp
theatrus
ccdni0t
<|sols|><|sot|>array_product() returns the product of the values in an array. Guess what it returns if the array is empty.<|eot|><|sol|>http://php.net/array_product<|eol|><|sor|>This actually makes perfect sense, for example `product []` in haskell is 1 (see: http://tryhaskell.org/) Product is defined "product" as red...
9
lolphp
infinull
ccdnewu
<|sols|><|sot|>array_product() returns the product of the values in an array. Guess what it returns if the array is empty.<|eot|><|sol|>http://php.net/array_product<|eol|><|sor|>This actually makes perfect sense, for example `product []` in haskell is 1 (see: http://tryhaskell.org/) Product is defined "product" as red...
6
lolphp
IJCQYR
1gekbx
<|sols|><|sot|>Unserialization can result in code being loaded and executed due to object instantiation and autoloading<|eot|><|sol|>http://www.alertlogic.com/writing-exploits-for-exotic-bug-classes/<|eol|><|eols|><|endoftext|>
0
lolphp
kasnalin
cajgqnp
<|sols|><|sot|>Unserialization can result in code being loaded and executed due to object instantiation and autoloading<|eot|><|sol|>http://www.alertlogic.com/writing-exploits-for-exotic-bug-classes/<|eol|><|sor|>Well, yes, if you don't heed the manual's advice and pass untrusted input to `unserialize()`, which can cre...
5
lolphp
Daishiman
kvpea
<|soss|><|sot|>The PDO::quote method is an instance method, so even if you want to create some quoted SQL parameters, you'll have to construct a useless PDO instance.<|eot|><|sost|><|eost|><|eoss|><|endoftext|>
0
lolphp
obi_hoernchen
d0lxng
<|sols|><|sot|>"This is documented behaviour..."<|eot|><|sol|>https://github.com/doctrine/orm/issues/5287<|eol|><|eols|><|endoftext|>
0
lolphp
the_alias_of_andrea
ezaluvf
<|sols|><|sot|>"This is documented behaviour..."<|eot|><|sol|>https://github.com/doctrine/orm/issues/5287<|eol|><|sor|>This isn't PHP the language, just code written in PHP, so not really on-topic.<|eor|><|eols|><|endoftext|>
14
lolphp
obi_hoernchen
ezamvmb
<|sols|><|sot|>"This is documented behaviour..."<|eot|><|sol|>https://github.com/doctrine/orm/issues/5287<|eol|><|sor|>Can someone explain the issue to me? I don't have enough context to know why this is surprising behavior.<|eor|><|soopr|>`Query::iterate()` returns an `IterableResult`, which is an iterator over a coll...
5
lolphp
FreaXoMatic
75o0vb
<|sols|><|sot|>var_dump($test2) = a<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/8a78d479c3c45e2e7e189a5d524ca928054c92d5<|eol|><|eols|><|endoftext|>
0
lolphp
squiggleslash
do7t2io
<|sols|><|sot|>var_dump($test2) = a<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/8a78d479c3c45e2e7e189a5d524ca928054c92d5<|eol|><|soopr|>Can someone explain why $test2 equals to 'a' instead of anything else. Btw, this works only on 5.3 and above. <?php $aest['test'] = "testa"; $test = test;...
11
lolphp
Almamu
do7tlzs
<|sols|><|sot|>var_dump($test2) = a<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/8a78d479c3c45e2e7e189a5d524ca928054c92d5<|eol|><|soopr|>Can someone explain why $test2 equals to 'a' instead of anything else. Btw, this works only on 5.3 and above. <?php $aest['test'] = "testa"; $test = test;...
5
lolphp
mcosta
5hw6rb
<|sols|><|sot|>Why Rounding Does Not Always Work As Expected<|eot|><|sol|>https://wiki.debian.org/PHP/Rounding<|eol|><|eols|><|endoftext|>
0
lolphp
Deviltry1
db3jgx9
<|sols|><|sot|>Why Rounding Does Not Always Work As Expected<|eot|><|sol|>https://wiki.debian.org/PHP/Rounding<|eol|><|sor|>Why the hell Debian wiki has wiki for PHP?<|eor|><|eols|><|endoftext|>
9
lolphp
carlos_vini
db44sxp
<|sols|><|sot|>Why Rounding Does Not Always Work As Expected<|eot|><|sol|>https://wiki.debian.org/PHP/Rounding<|eol|><|sor|>This example works since PHP 5.2.7: https://3v4l.org/oOAmC. More than 8 years ago.<|eor|><|eols|><|endoftext|>
5
lolphp
jmalloc
1p3xo4
<|sols|><|sot|>PHP considered harmful... by chrome.<|eot|><|sol|>http://i.imgur.com/PooWVpo.png<|eol|><|eols|><|endoftext|>
0
lolphp
geerlingguy
1no3pb
<|sols|><|sot|>Most PHP applications Ive encountered in the wild<|eot|><|sol|>http://hardtickettohomevideo.files.wordpress.com/2012/09/tumblr_m3th8ack7x1qlgjmlo1_1280.png<|eol|><|eols|><|endoftext|>
0
lolphp
RonAtDD
1loc7a
<|sols|><|sot|>This is 3 days old, and nobody has gotten a lol yet? Face::sad()<|eot|><|sol|>http://www.reddit.com/r/PHPhelp/comments/1lgzx2/help_with_my_dic/<|eol|><|eols|><|endoftext|>
0
lolphp
lindy-hop
1k0ms0
<|sols|><|sot|>PHP can't even get the damn' double-claw hammer right.<|eot|><|sol|>http://www.reddit.com/r/whatisthisthing/comments/1jygsd/what_is_this_doubleclawed_hammer_for/<|eol|><|eols|><|endoftext|>
0
lolphp
jamwaffles
1ja3j7
<|sols|><|sot|>Even these people know what's right<|eot|><|sol|>http://www.developerarguments.com/php-vs-anything-else/<|eol|><|eols|><|endoftext|>
0
lolphp
notwhereyouare
1gnl43
<|soss|><|sot|>fun with converting timestamps to readable formation<|eot|><|sost|>So, I'm trying to get php to convert a ungodly timestamp into a readable format. I have the following stuff $originalString = 20130606000000; $readableDate = substr($soar_begin_date,4,2).'-'.substr($soar_begin_date,6,2).'-'.subs...
0
lolphp
midir
calxm5h
<|soss|><|sot|>fun with converting timestamps to readable formation<|eot|><|sost|>So, I'm trying to get php to convert a ungodly timestamp into a readable format. I have the following stuff $originalString = 20130606000000; $readableDate = substr($soar_begin_date,4,2).'-'.substr($soar_begin_date,6,2).'-'.subs...
5
lolphp
ezzatron
sdcpp
<|sols|><|sot|>PHP SOAP error message rednecks<|eot|><|sol|>http://qkme.me/3ot67n<|eol|><|eols|><|endoftext|>
0
lolphp
phplovesong
i89p5r
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|eols|><|endoftext|>
0
lolphp
IluTov
g174i3m
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>This has 0 to do with parsing. The reason it fails is because PHP 4 style constructors are deprecated. That is, PHP used to have constructors with the same name as the class instead of the `__construct` keyw...
22
lolphp
elcapitanoooo
g170lbj
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>This is obviously a "lol developer", but at the same it shows how fragile the php parser actually is. By design the "__construct" should only be "visible" inside the class and not affected by any outside nam...
19
lolphp
stfcfanhazz
g19g8ey
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>Why would you name a class __construct?<|eor|><|eols|><|endoftext|>
10
lolphp
Takeoded
g179ebd
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>haha yeah, it matches the signature of both modern php5+ constructors, *AND* the signature of old php4 constructors, PHP7 is unsure which of those it is, and assumes you want a PHP4 constructor.. (even tho i...
8
lolphp
smegnose
g17ek3s
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>It is funny, though I'd bet you any money it's less performant to do an extra `if` to check whether the class name is exactly `__construct` after checking for a PHP4-style constructor method. You're not mean...
6
lolphp
Altreus
g17l3kv
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>This has 0 to do with parsing. The reason it fails is because PHP 4 style constructors are deprecated. That is, PHP used to have constructors with the same name as the class instead of the `__construct` keyw...
5
lolphp
IluTov
g18j98l
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>This has 0 to do with parsing. The reason it fails is because PHP 4 style constructors are deprecated. That is, PHP used to have constructors with the same name as the class instead of the `__construct` keyw...
5
lolphp
cosmicsans
g17of17
<|sols|><|sot|>PHP parser gets confused<|eot|><|sol|>https://repl.it/repls/WelloffWeirdGlobalarrays<|eol|><|sor|>This has 0 to do with parsing. The reason it fails is because PHP 4 style constructors are deprecated. That is, PHP used to have constructors with the same name as the class instead of the `__construct` keyw...
5
lolphp
Jinxuan
ej4q3c
<|soss|><|sot|>new statement cannot parse with parenthesis<|eot|><|sost|>This code works: ``` class A {} $a = 'A'; new $a; // Return a new instance ofA ``` However, if we add a parenthesis, then it cannot be parsed: ``` class A {} $a = 'A'; new ($a); //PHP Parse error: syntax error, unexpected '(' new 'A'...
0
lolphp
squiggleslash
fcwjbmc
<|soss|><|sot|>new statement cannot parse with parenthesis<|eot|><|sost|>This code works: ``` class A {} $a = 'A'; new $a; // Return a new instance ofA ``` However, if we add a parenthesis, then it cannot be parsed: ``` class A {} $a = 'A'; new ($a); //PHP Parse error: syntax error, unexpected '(' new 'A'...
7
lolphp
LennyZoid
7gnhan
<|soss|><|sot|>Question about PHP...<|eot|><|sost|>1.Why people hate PHP? 2.What are your thoughts on Node.js 3.Why "PYTHON" btw?<|eost|><|eoss|><|endoftext|>
0
lolphp
xiongchiamiov
dqkn5e0
<|soss|><|sot|>Question about PHP...<|eot|><|sost|>1.Why people hate PHP? 2.What are your thoughts on Node.js 3.Why "PYTHON" btw?<|eost|><|sor|>This isn't really a PHP discussion forum, but 1. PHP has grown organically, rather than being designed, and as such has a whole bunch of warts. The past five years new peopl...
8
lolphp
marcini82
dqsnexr
<|soss|><|sot|>Question about PHP...<|eot|><|sost|>1.Why people hate PHP? 2.What are your thoughts on Node.js 3.Why "PYTHON" btw?<|eost|><|sor|>I know it's a lolphp subreddit and if you read it, you might think that php is the worst programming language that ever exist and all php programmers hate it, but in fact rea...
5
lolphp
sickjobpeople
3vspsb
<|sols|><|sot|>A proposed CACHE standard. Because caching should always be this convoluted.<|eot|><|sol|>https://github.com/php-fig/fig-standards/blob/eb3e9edab3adc754ae9aace2d113fc175a359334/proposed/cache.md<|eol|><|eols|><|endoftext|>
0
lolphp
computerfreak97
cxqbi43
<|sols|><|sot|>A proposed CACHE standard. Because caching should always be this convoluted.<|eot|><|sol|>https://github.com/php-fig/fig-standards/blob/eb3e9edab3adc754ae9aace2d113fc175a359334/proposed/cache.md<|eol|><|sor|>This really isn't that convoluted...<|eor|><|eols|><|endoftext|>
13
lolphp
Sheepshow
cxqi7d7
<|sols|><|sot|>A proposed CACHE standard. Because caching should always be this convoluted.<|eot|><|sol|>https://github.com/php-fig/fig-standards/blob/eb3e9edab3adc754ae9aace2d113fc175a359334/proposed/cache.md<|eol|><|sor|> public function isHit(); Small typo there. Should be public function iShit();<|eor|><|e...
10
lolphp
iopq
1k9mvw
<|soss|><|sot|>round() doesn't actually round<|eot|><|sost|>I had a bug in a payment system where the paypal payment amounts don't add up. I looked into it, and the amounts were something like `18.799999999999` apparently, someone used `round($amount, 2)` and expected PHP to actually round the number to two digits Fo...
0
lolphp
mirhagk
cbmtygx
<|soss|><|sot|>round() doesn't actually round<|eot|><|sost|>I had a bug in a payment system where the paypal payment amounts don't add up. I looked into it, and the amounts were something like `18.799999999999` apparently, someone used `round($amount, 2)` and expected PHP to actually round the number to two digits Fo...
18
lolphp
ioctl79
cbmtyq3
<|soss|><|sot|>round() doesn't actually round<|eot|><|sost|>I had a bug in a payment system where the paypal payment amounts don't add up. I looked into it, and the amounts were something like `18.799999999999` apparently, someone used `round($amount, 2)` and expected PHP to actually round the number to two digits Fo...
15
lolphp
midir
cbmsjkn
<|soss|><|sot|>round() doesn't actually round<|eot|><|sost|>I had a bug in a payment system where the paypal payment amounts don't add up. I looked into it, and the amounts were something like `18.799999999999` apparently, someone used `round($amount, 2)` and expected PHP to actually round the number to two digits Fo...
5
lolphp
midir
cbmvbew
<|soss|><|sot|>round() doesn't actually round<|eot|><|sost|>I had a bug in a payment system where the paypal payment amounts don't add up. I looked into it, and the amounts were something like `18.799999999999` apparently, someone used `round($amount, 2)` and expected PHP to actually round the number to two digits Fo...
5
lolphp
sclv
18e5ny
<|sols|><|sot|>PHP versus PCP<|eot|><|sol|>http://www.dadhacker.com/blog/?p=1914<|eol|><|eols|><|endoftext|>
0
lolphp
Takeoded
kdluto
<|sols|><|sot|>how to do async queries in PDO<|eot|><|sol|>https://gist.github.com/divinity76/adcf1526d3e6a536fda20fdb1dd86339<|eol|><|eols|><|endoftext|>
0
lolphp
sproingie
gfy0e6u
<|sols|><|sot|>how to do async queries in PDO<|eot|><|sol|>https://gist.github.com/divinity76/adcf1526d3e6a536fda20fdb1dd86339<|eol|><|sor|>echoing code to be eval'd on the command line seems a little silly when `pcntl_fork` is a thing. But yes, PDO needs async suppport.<|eor|><|eols|><|endoftext|>
11
lolphp
duskwuff
gfxwu6b
<|sols|><|sot|>how to do async queries in PDO<|eot|><|sol|>https://gist.github.com/divinity76/adcf1526d3e6a536fda20fdb1dd86339<|eol|><|sor|>1. The overhead of launching a subprocess, connecting to the database, and serializing/deserializing the query and results negates virtually all of the benefits of an asynchronous ...
11
lolphp
lankybiker
gfz2ykm
<|sols|><|sot|>how to do async queries in PDO<|eot|><|sol|>https://gist.github.com/divinity76/adcf1526d3e6a536fda20fdb1dd86339<|eol|><|sor|>Creative solution But why not use mysqli? Are you targeting another dB type?<|eor|><|eols|><|endoftext|>
5
lolphp
nyamsprod
8f0wan
<|sols|><|sot|>DateTime hidden public properties behaviour<|eot|><|sol|>https://3v4l.org/mWluN<|eol|><|eols|><|endoftext|>
0
lolphp
Diiix
dxzvoba
<|sols|><|sot|>DateTime hidden public properties behaviour<|eot|><|sol|>https://3v4l.org/mWluN<|eol|><|sor|>>I'm using an undocumented API and experiencing unexpected behaviour Wow that's really interesting, please tell me more.<|eor|><|eols|><|endoftext|>
29
lolphp
Diiix
dxzxbmu
<|sols|><|sot|>DateTime hidden public properties behaviour<|eot|><|sol|>https://3v4l.org/mWluN<|eol|><|sor|>>I'm using an undocumented API and experiencing unexpected behaviour Wow that's really interesting, please tell me more.<|eor|><|soopr|>If an undocumented API leads to bugs then hell yeah that's a problem. * Sh...
19
lolphp
Diiix
dy0029v
<|sols|><|sot|>DateTime hidden public properties behaviour<|eot|><|sol|>https://3v4l.org/mWluN<|eol|><|sor|>>I'm using an undocumented API and experiencing unexpected behaviour Wow that's really interesting, please tell me more.<|eor|><|soopr|>If an undocumented API leads to bugs then hell yeah that's a problem. * Sh...
14
lolphp
Diiix
dxzyg1r
<|sols|><|sot|>DateTime hidden public properties behaviour<|eot|><|sol|>https://3v4l.org/mWluN<|eol|><|sor|>>I'm using an undocumented API and experiencing unexpected behaviour Wow that's really interesting, please tell me more.<|eor|><|soopr|>If an undocumented API leads to bugs then hell yeah that's a problem. * Sh...
13
lolphp
mstx
dxzrrhs
<|sols|><|sot|>DateTime hidden public properties behaviour<|eot|><|sol|>https://3v4l.org/mWluN<|eol|><|sor|>Just because a property is public doesn't necessarily mean you can change it to whatever you want. <|eor|><|eols|><|endoftext|>
7
lolphp
doubtfulwager
81omom
<|soss|><|sot|>PHP operations on different data types<|eot|><|sost|>Curiousity got the better of me and this was the result: https://3v4l.org/joVGh Any additions/refactors would be gladly appreciated <?php $ops = [ 'x == true', 'x === true', 'x == false', 'x === false', 'x == 0', 'x == 1', ...
0
lolphp
doubtfulwager
dv4847j
<|soss|><|sot|>PHP operations on different data types<|eot|><|sost|>Curiousity got the better of me and this was the result: https://3v4l.org/joVGh Any additions/refactors would be gladly appreciated <?php $ops = [ 'x == true', 'x === true', 'x == false', 'x === false', 'x == 0', 'x == 1', ...
8
lolphp
Oeldin1234
80ebsn
<|sols|><|sot|>"false" is definitely true<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692<|eol|><|eols|><|endoftext|>
0
lolphp
Oeldin1234
duuvxgj
<|sols|><|sot|>"false" is definitely true<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692<|eol|><|soopr|>You could argue that Strings are true per definition, but then, why are "" and "0" false?<|eoopr|><|eols|><|endoftext|>
17
lolphp
Razakel
duuzih4
<|sols|><|sot|>"false" is definitely true<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692<|eol|><|soopr|>You could argue that Strings are true per definition, but then, why are "" and "0" false?<|eoopr|><|sor|>PHP isn't a strongly-typed language unless you're using OOP, ...
12
lolphp
squiggleslash
duwh1js
<|sols|><|sot|>"false" is definitely true<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692<|eol|><|sor|>I'll allow it. While technically It's Documented(tm) a reasonable programmer would expect a function that accepts a string whose name implies it'll convert it to a bool...
6
lolphp
barubary
duwzrq4
<|sols|><|sot|>"false" is definitely true<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692<|eol|><|soopr|>You could argue that Strings are true per definition, but then, why are "" and "0" false?<|eoopr|><|sor|>I don't get this. Why would you expect the string `"false"` t...
6
lolphp
guy99882
dv61ar6
<|sols|><|sot|>"false" is definitely true<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692<|eol|><|soopr|>You could argue that Strings are true per definition, but then, why are "" and "0" false?<|eoopr|><|sor|>PHP isn't a strongly-typed language unless you're using OOP, ...
5
lolphp
barubary
duxmtuv
<|sols|><|sot|>"false" is definitely true<|eot|><|sol|>http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692<|eol|><|soopr|>You could argue that Strings are true per definition, but then, why are "" and "0" false?<|eoopr|><|sor|>I don't get this. Why would you expect the string `"false"` t...
5
lolphp
iftpadfs
5nea9e
<|sols|><|sot|>Wikipedia<|eot|><|sol|>https://imgur.com/a/eZDyR<|eol|><|eols|><|endoftext|>
0
lolphp
dotted
dcb4tfp
<|sols|><|sot|>Wikipedia<|eot|><|sol|>https://imgur.com/a/eZDyR<|eol|><|sor|>not really lolphp<|eor|><|eols|><|endoftext|>
13
lolphp
iftpadfs
dcaslt6
<|sols|><|sot|>Wikipedia<|eot|><|sol|>https://imgur.com/a/eZDyR<|eol|><|soopr|>They joys of non type safe programming.<|eoopr|><|eols|><|endoftext|>
8
lolphp
the_alias_of_andrea
410xuq
<|soss|><|sot|>Does anyone else think PHP can become the next Apple?<|eot|><|sost|>https://www.reddit.com/r/PHP/comments/40ziuk/does_anyone_else_think_php_can_become_the_next/<|eost|><|eoss|><|endoftext|>
0
lolphp
catcradle5
cyyz2uo
<|soss|><|sot|>Does anyone else think PHP can become the next Apple?<|eot|><|sost|>https://www.reddit.com/r/PHP/comments/40ziuk/does_anyone_else_think_php_can_become_the_next/<|eost|><|sor|>I mean, that's clearly satirical Nobody is taking this seriously<|eor|><|soopr|>Poe's law.<|eoopr|><|sor|>You can't use Poe's law...
12
lolphp
cube-drone
cyyrvss
<|soss|><|sot|>Does anyone else think PHP can become the next Apple?<|eot|><|sost|>https://www.reddit.com/r/PHP/comments/40ziuk/does_anyone_else_think_php_can_become_the_next/<|eost|><|sor|>I mean, that's clearly satirical Nobody is taking this seriously<|eor|><|eoss|><|endoftext|>
11
lolphp
myaut
cyz1aio
<|soss|><|sot|>Does anyone else think PHP can become the next Apple?<|eot|><|sost|>https://www.reddit.com/r/PHP/comments/40ziuk/does_anyone_else_think_php_can_become_the_next/<|eost|><|sor|>Judging by amount of holy wars around PHP, it is clearly an "Apple of Discord".<|eor|><|eoss|><|endoftext|>
9
lolphp
Zenmaster13
3tknqt
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|eols|><|endoftext|>
0
lolphp
the_alias_of_andrea
cx6yqnk
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|sor|>implode() is a function for making an array of strings into a single string with separators. If you give it an array with elements that aren't strings, they'...
43
lolphp
philsown
cx7dbkz
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|sor|>In PHP, 1 and '' are the string representations of booleans, so it's not that crazy.<|eor|><|eols|><|endoftext|>
17
lolphp
thenickdude
cx79c2b
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|sor|>Why would you even want to call implode on an array of booleans?<|eor|><|eols|><|endoftext|>
13
lolphp
Fahkfahkfahkfahkfahk
cx7kmn6
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|sor|>>implode() can, for historical reasons, accept its parameters in either order. <|eor|><|eols|><|endoftext|>
9
lolphp
badmonkey0001
cx86e2f
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|sor|>>implode() can, for historical reasons, accept its parameters in either order. <|eor|><|sor|>Yet for things like jQuery, that's acceptable sugar to many folk...
8
lolphp
olsner
cx74k1r
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|sor|>implode() is a function for making an array of strings into a single string with separators. If you give it an array with elements that aren't strings, they'...
7
lolphp
Fahkfahkfahkfahkfahk
cx81w4t
<|sols|><|sot|>Using implode() on an array of booleans will cast TRUE to 1 and FALSE to ''<|eot|><|sol|>http://php.net/manual/en/function.implode.php<|eol|><|sor|>>implode() can, for historical reasons, accept its parameters in either order. <|eor|><|sor|>Yet for things like jQuery, that's acceptable sugar to many folk...
6
lolphp
luminairex
zjqvc
<|sols|><|sot|>"!==" and "==!" are both valid syntax and compare entirely different things. <|eot|><|sol|>http://stackoverflow.com/questions/12313423/difference-between-and<|eol|><|eols|><|endoftext|>
0
lolphp
fragglet
c65d37y
<|sols|><|sot|>"!==" and "==!" are both valid syntax and compare entirely different things. <|eot|><|sol|>http://stackoverflow.com/questions/12313423/difference-between-and<|eol|><|sor|>Not a WTF; someone simply failed to understand the syntax.<|eor|><|eols|><|endoftext|>
5
lolphp
reddituser11111
21gk55
<|sols|><|sot|>PHP closing tag? Who needs it!<|eot|><|sol|>https://www.google.com/search?q=php+closing+tag&oq=php+closing+tag&aqs=chrome..69i57j0l5.1405j0j7&sourceid=chrome&espv=210&es_sm=119&ie=UTF-8#q=php+closing+tag+best+practices<|eol|><|eols|><|endoftext|>
0
lolphp
huf
cgcth0f
<|sols|><|sot|>PHP closing tag? Who needs it!<|eot|><|sol|>https://www.google.com/search?q=php+closing+tag&oq=php+closing+tag&aqs=chrome..69i57j0l5.1405j0j7&sourceid=chrome&espv=210&es_sm=119&ie=UTF-8#q=php+closing+tag+best+practices<|eol|><|sor|>uhm, yes? and? do you really want to spend hours hunting for that one fil...
24
lolphp
n1c0_ds
cgcw732
<|sols|><|sot|>PHP closing tag? Who needs it!<|eot|><|sol|>https://www.google.com/search?q=php+closing+tag&oq=php+closing+tag&aqs=chrome..69i57j0l5.1405j0j7&sourceid=chrome&espv=210&es_sm=119&ie=UTF-8#q=php+closing+tag+best+practices<|eol|><|sor|>uhm, yes? and? do you really want to spend hours hunting for that one fil...
5
lolphp
allthediamonds
20pnkr
<|soss|><|sot|>You know Rasmus Lerdorf's famous quote about restarting Apache every 10 requests? It's an actual setting on PHP-FPM.<|eot|><|sost|>> ; The number of requests each child process should execute before respawning. > ; This can be useful to work around memory leaks in 3rd party libraries. For > ; endless...
0
lolphp
bart2019
cg5jt50
<|soss|><|sot|>You know Rasmus Lerdorf's famous quote about restarting Apache every 10 requests? It's an actual setting on PHP-FPM.<|eot|><|sost|>> ; The number of requests each child process should execute before respawning. > ; This can be useful to work around memory leaks in 3rd party libraries. For > ; endless...
8
lolphp
Twirrim
cg5l65s
<|soss|><|sot|>You know Rasmus Lerdorf's famous quote about restarting Apache every 10 requests? It's an actual setting on PHP-FPM.<|eot|><|sost|>> ; The number of requests each child process should execute before respawning. > ; This can be useful to work around memory leaks in 3rd party libraries. For > ; endless...
8
lolphp
allthediamonds
cg5lx3z
<|soss|><|sot|>You know Rasmus Lerdorf's famous quote about restarting Apache every 10 requests? It's an actual setting on PHP-FPM.<|eot|><|sost|>> ; The number of requests each child process should execute before respawning. > ; This can be useful to work around memory leaks in 3rd party libraries. For > ; endless...
5
lolphp
yousai
1qdi2w
<|sols|><|sot|>My current pet peeve with PHP<|eot|><|sol|>http://i.imgur.com/vjQ0kS6.png<|eol|><|eols|><|endoftext|>
0
lolphp
phper1
197qzb
<|sols|><|sot|>[WebComic] Lots of PHP Frameworks<|eot|><|sol|>http://comics.knreddy.com/?p=php-fx<|eol|><|eols|><|endoftext|>
0