subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
lolphp
drcforbin
h9b9gct
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
95
lolphp
colshrapnel
h9aqrw7
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
36
lolphp
CarnivorousSociety
h9bhh2g
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
19
lolphp
dwalker109
h9bjor3
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
15
lolphp
metamorphosis
h9clk14
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
12
lolphp
intuxikated
h9azlf5
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
7
lolphp
antoniocs
h9e2yb4
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
6
lolphp
b1ackcat
h9ddhm7
<|soss|><|sot|>Product Manager seeking recommendations on static code performance optimizers.<|eot|><|sost|>Hi Everyone. I am looking for a recommendation on a static PHP code analyzer for performance. I came from a Java background, so I am new to the PHP community. I am looking for a tool for a sniff test to de...
5
lolphp
D1551D3N7
mlcj1o
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
20
lolphp
carlos_vini
gtklzq4
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
35
lolphp
D1551D3N7
gtknjsx
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
21
lolphp
Muzer0
gtky26w
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
16
lolphp
Muzer0
gtkxgfi
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
14
lolphp
yetzederixx
gtkstpe
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
14
lolphp
loptr
gtkpnv2
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
13
lolphp
colshrapnel
gtkm7tb
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
12
lolphp
Muzer0
gtkxliv
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
12
lolphp
h0rst_
gtl6th3
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
12
lolphp
colshrapnel
gtkmq3q
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
11
lolphp
duskwuff
gtlaifv
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
9
lolphp
Muzer0
gtky7gm
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
7
lolphp
ealf
gtq14er
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
6
lolphp
sproingie
gtmnqg3
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
5
lolphp
ZiggyTheHamster
gtlxebn
<|soss|><|sot|>Or and || act differently in some contexts<|eot|><|sost|> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $myFile = fopen('/tmp/aaaaaaaaaa', "a") or die('unable to open'); fwrite($myFile,'ok lol'); fclose($myFile); $myFile2...
5
lolphp
girst
d1gic6
<|sols|><|sot|>Rasmus Lendorf on 25 years of PHP (and its mistakes)<|eot|><|sol|>https://www.youtube.com/watch?v=wCZ5TJCBWMg<|eol|><|eols|><|endoftext|>
19
lolphp
jsanc623
ezmaj7x
<|sols|><|sot|>Rasmus Lendorf on 25 years of PHP (and its mistakes)<|eot|><|sol|>https://www.youtube.com/watch?v=wCZ5TJCBWMg<|eol|><|soopr|>Some explanations make sense, others don't to me (like how he on the one hand says that he expected PHP to die within half a year, yet kept pushing new features and performance hac...
9
lolphp
girst
ezlc97b
<|sols|><|sot|>Rasmus Lendorf on 25 years of PHP (and its mistakes)<|eot|><|sol|>https://www.youtube.com/watch?v=wCZ5TJCBWMg<|eol|><|soopr|>Some explanations make sense, others don't to me (like how he on the one hand says that he expected PHP to die within half a year, yet kept pushing new features and performance hac...
7
lolphp
PGLubricants
ckexmw
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|eols|><|endoftext|>
20
lolphp
AlbertRammstein
evmqduk
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|sor|>The first line of documentation is a big ooooof/[citation needed] from me "Sometimes it is convenient to be able to have variable variable names"<|e...
28
lolphp
scotchanddonuts
evn2l6b
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|sor|>In most other languages this is just called "reflection".<|eor|><|eols|><|endoftext|>
19
lolphp
Altreus
evpvpni
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|sor|>Every other language: We have a feature so you can't accidentally use variables that don't exist because we learned it was a big problem with no bene...
16
lolphp
Miserable_Fuck
evn0qkh
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|sor|>The first line of documentation is a big ooooof/[citation needed] from me "Sometimes it is convenient to be able to have variable variable names"<|e...
12
lolphp
mktiti
evpadbu
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|sor|>In most other languages this is just called "reflection".<|eor|><|sor|>No, it is like pointers.<|eor|><|sor|>But it doesn't 'point' to a memory locat...
12
lolphp
PGLubricants
evpbrof
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|soopr|>To add to the madness, the top user-contributed note shows this nifty example: <?php //You can even add more Dollar Signs ...
10
lolphp
oipoi
evonerh
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|sor|>The first line of documentation is a big ooooof/[citation needed] from me "Sometimes it is convenient to be able to have variable variable names"<|e...
10
lolphp
stfcfanhazz
evmr5dl
<|sols|><|sot|>You probably heard of variables, but what about variable variables?<|eot|><|sol|>https://www.php.net/manual/en/language.variables.variable.php<|eol|><|sor|>I actually have used this a fair bit but normally for object properties or array indexes in certain specific circumstances. Magic begets magic- php ...
5
lolphp
babyra
4lzhye
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|eols|><|endoftext|>
18
lolphp
maweki
d3riacu
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|sor|>First they rediscover all the features from other languages, now they rediscover how to use those features. Goo...
30
lolphp
Takeoded
d3rvei2
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|sor|>[deleted]<|eor|><|sor|>http://www.urbandictionary.com/define.php?term=Genious<|eor|><|eols|><|endoftext|>
18
lolphp
armornick
d3rh93n
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|sor|>> fact that finally can replace catch entirely is a testament to the fact that it doesn't have to have anythin...
13
lolphp
tdammers
d3rk5oe
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|sor|>The funniest / saddest part is that, like everything in PHP land, this pseudo-RAII works fine, until it doesn't...
13
lolphp
autourbanbot
d3rvfde
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|sor|>[deleted]<|eor|><|sor|>http://www.urbandictionary.com/define.php?term=Genious<|eor|><|sor|>*Here's the Urban Di...
13
lolphp
the_pw_is_in_this_ID
d3s1io0
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|sor|>> fact that finally can replace catch entirely is a testament to the fact that it doesn't have to have anythin...
6
lolphp
the_pw_is_in_this_ID
d3u6cyr
<|sols|><|sot|>Php programmer makes awesome discovery and the fellow php programmers cheer on...<|eot|><|sol|>https://www.reddit.com/r/PHP/comments/4lu3gf/deferred_execution_in_php_using_finally/<|eol|><|sor|>> fact that finally can replace catch entirely is a testament to the fact that it doesn't have to have anythin...
6
lolphp
iheartrms
360twc
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|eols|><|endoftext|>
17
lolphp
JiminP
cr9u5m4
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
30
lolphp
tdammers
cr9u02i
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>How is this a "new vulnerability"? PHP's "loose comparison operators" (`==` and `!=`) have been broken since 1.0, and will be until the sun dies a...
22
lolphp
OneWingedShark
crau1sy
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>How is this a "new vulnerability"? PHP's "loose comparison operators" (`==` and `!=`) have been broken since 1.0, and will be until the sun dies a...
16
lolphp
vita10gy
cra1c9a
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
16
lolphp
tdammers
cr9tzth
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
14
lolphp
bart2019
cr9t6v1
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
10
lolphp
phoshi
cr9vkp0
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
10
lolphp
tdammers
cragso7
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>How is this a "new vulnerability"? PHP's "loose comparison operators" (`==` and `!=`) have been broken since 1.0, and will be until the sun dies a...
9
lolphp
phoshi
cr9rmw5
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
9
lolphp
phoshi
cr9tqhh
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
9
lolphp
gu3st12
cr9p2wi
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
8
lolphp
WrasslorMonkey
cr9rdrs
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
5
lolphp
merreborn
craev7y
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>And shit like this is why I ALWAYS type check.<|eor|><|sor|>Using `===` still leaves you vulnerable to timing attacks. When comparing hashes, `ha...
5
lolphp
tdammers
cra5iyp
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>How is this a "new vulnerability"? PHP's "loose comparison operators" (`==` and `!=`) have been broken since 1.0, and will be until the sun dies a...
5
lolphp
Kwpolska
csdnpa4
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>How is this a "new vulnerability"? PHP's "loose comparison operators" (`==` and `!=`) have been broken since 1.0, and will be until the sun dies a...
5
lolphp
merreborn
craitqw
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>And shit like this is why I ALWAYS type check.<|eor|><|sor|>Using `===` still leaves you vulnerable to timing attacks. When comparing hashes, `ha...
5
lolphp
phoshi
cr9tqtt
<|sols|><|sot|>PHP hash comparison flaw is a risk for million users<|eot|><|sol|>http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html<|eol|><|sor|>This isn't a PHP hash comparison flaw (nor is it a lolphp). This is people not using the correct operator, or (better) using a timing-safe hash co...
5
lolphp
fnzp
2g681k
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|eols|><|endoftext|>
18
lolphp
DoubleNabla
ckgf6zr
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Getting it "right" is hard to define if the code is wrong.<|eor|><|sor|>Yes, but of course, [the documentation](http://php.net/manual/en/function.strcmp.php) is even more wronger: > Returns < 0 if str...
18
lolphp
PhantomRacer
ckg6vkp
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Getting it "right" is hard to define if the code is wrong.<|eor|><|eols|><|endoftext|>
11
lolphp
fnzp
ckgkmfa
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Getting it "right" is hard to define if the code is wrong.<|eor|><|soopr|>Not true. Getting it right when the code is wrong is the easiest: die("YOUR CODE IS WRONG FIX IT OR THIS PROGRAM CAN'T RUN...
8
lolphp
fnzp
ckhoe95
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Wouldn't it be a better comparison if the code didn't have dozens of notices and warning? Or does it only do something wrong if your code is wrong and full of errors?<|eor|><|soopr|>Yes you're right. S...
8
lolphp
MiyatodukenMiyamaap
ckgakaw
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>I was going to point out that the manual warns you to use === with strcmp() for this very reason... but it turns out it doesn't.<|eor|><|eols|><|endoftext|>
7
lolphp
fnzp
ckgpkbh
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>I was going to point out that the manual warns you to use === with strcmp() for this very reason... but it turns out it doesn't.<|eor|><|soopr|>To be fair, it does!* http://php.net/manual/en/function.s...
7
lolphp
iopq
ckgle1d
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Getting it "right" is hard to define if the code is wrong.<|eor|><|sor|>Yes, but of course, [the documentation](http://php.net/manual/en/function.strcmp.php) is even more wronger: > Returns < 0 if str...
7
lolphp
mort96
ckg7dv3
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Wouldn't it be a better comparison if the code didn't have dozens of notices and warning? Or does it only do something wrong if your code is wrong and full of errors?<|eor|><|eols|><|endoftext|>
6
lolphp
DoubleNabla
ckg9scj
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Getting it "right" is hard to define if the code is wrong.<|eor|><|sor|>Yes, but of course, [the documentation](http://php.net/manual/en/function.strcmp.php) is even more wronger: > Returns < 0 if str...
6
lolphp
OneWingedShark
ckhmozy
<|sols|><|sot|>They broke strcmp() in php5.3, it used to get it right!<|eot|><|sol|>http://3v4l.org/LE8Jb<|eol|><|sor|>Getting it "right" is hard to define if the code is wrong.<|eor|><|soopr|>Not true. Getting it right when the code is wrong is the easiest: die("YOUR CODE IS WRONG FIX IT OR THIS PROGRAM CAN'T RUN...
5
lolphp
recaph
1v81xy
<|sols|><|sot|>Switch uses loose comparison<|eot|><|sol|>http://www.php.net/manual/en/control-structures.switch.php<|eol|><|eols|><|endoftext|>
17
lolphp
Porges
cepzxyr
<|sols|><|sot|>Switch uses loose comparison<|eot|><|sol|>http://www.php.net/manual/en/control-structures.switch.php<|eol|><|sor|>From TFM: > Note: Note that unlike some other languages, the `continue` statement applies to switch and acts similar to `break`. If you have a switch inside a loop and wish to continue to th...
9
lolphp
recaph
ceqbi53
<|sols|><|sot|>Switch uses loose comparison<|eot|><|sol|>http://www.php.net/manual/en/control-structures.switch.php<|eol|><|soopr|>To clarify, this pretty much means that switch statements are useless, unless you verify the type of the input to the switch. In the following example, I'll try to highlight some of the dan...
7
lolphp
poizan42
1uy0mv
<|soss|><|sot|>DomainException,RangeException,OutOfRangeException and OutOfBoundsException<|eot|><|sost|>So we have these four different exceptions which may or may not be for the same thing: * [DomainException](http://www.php.net/manual/en/class.domainexception.php): Exception thrown if a value does not adhere to a d...
17
lolphp
TheGreatFohl
cemtyru
<|soss|><|sot|>DomainException,RangeException,OutOfRangeException and OutOfBoundsException<|eot|><|sost|>So we have these four different exceptions which may or may not be for the same thing: * [DomainException](http://www.php.net/manual/en/class.domainexception.php): Exception thrown if a value does not adhere to a d...
6
lolphp
shoghicp
16477d
<|sols|><|sot|>At the Limits of PHP - Minecraft Pocket Edition UDP Server - Pure PHP<|eot|><|sol|>http://shoghicp.github.com/PocketMine-MP/<|eol|><|eols|><|endoftext|>
17
lolphp
ealf
g2wcv
<|sols|><|sot|>I nominate this function for the Orthogonal API Design Award.<|eot|><|sol|>http://www.php.net/manual/en/function.gzgetss.php<|eol|><|eols|><|endoftext|>
20
lolphp
ealf
qgshpr
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|eols|><|endoftext|>
17
lolphp
colshrapnel
hi86bas
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>uh oh what a blunder. "I run into the mud but it's Nike to blame that my sneakers are now soled!" In case you don't get it, 0e476654702450299632468777628354 is a legit ...
20
lolphp
barubary
hi89ya9
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>uh oh what a blunder. "I run into the mud but it's Nike to blame that my sneakers are now soled!" In case you don't get it, 0e476654702450299632468777628354 is a legit ...
16
lolphp
TinStingray
hi8qzxn
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>I think this is perfectly reasonable. You wanted a loose comparison and you got one.<|eor|><|eols|><|endoftext|>
12
lolphp
GoTriggerYourself
hicjba8
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>uh oh what a blunder. "I run into the mud but it's Nike to blame that my sneakers are now soled!" In case you don't get it, 0e476654702450299632468777628354 is a legit ...
8
lolphp
TinStingray
hic105t
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>I think this is perfectly reasonable. You wanted a loose comparison and you got one.<|eor|><|sor|>Loose comparisons are for things like 0 == "0", not absurd things like...
8
lolphp
colshrapnel
hi8au3a
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>uh oh what a blunder. "I run into the mud but it's Nike to blame that my sneakers are now soled!" In case you don't get it, 0e476654702450299632468777628354 is a legit ...
6
lolphp
CarnivorousSociety
hic79ra
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>Why would you use == for that in the first place ?<|eor|><|sor|>I still maintain 99% of all lolphp and php issues are based upon implicit type conversions happening when...
5
lolphp
barubary
hi8ko9y
<|sols|><|sot|>PHP 8 fixes ('foo' == 0), but keeps md5("FfHd0M7m") == 0<|eot|><|sol|>https://wiki.php.net/rfc/string_to_number_comparison<|eol|><|sor|>uh oh what a blunder. "I run into the mud but it's Nike to blame that my sneakers are now soled!" In case you don't get it, 0e476654702450299632468777628354 is a legit ...
5
lolphp
Mark_Messa
dn7g96
<|soss|><|sot|>PHP gc_probability/gc_divisor<|eot|><|sost|>According to [PHP Manual](https://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability): > **session.gc_probability** > session.gc_probability in conjunction with session.gc_divisor is used to manage probability that the gc (garbage col...
18
lolphp
the_alias_of_andrea
f59whew
<|soss|><|sot|>PHP gc_probability/gc_divisor<|eot|><|sost|>According to [PHP Manual](https://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability): > **session.gc_probability** > session.gc_probability in conjunction with session.gc_divisor is used to manage probability that the gc (garbage col...
7
lolphp
fast4shoot
f598uc2
<|soss|><|sot|>PHP gc_probability/gc_divisor<|eot|><|sost|>According to [PHP Manual](https://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability): > **session.gc_probability** > session.gc_probability in conjunction with session.gc_divisor is used to manage probability that the gc (garbage col...
6
lolphp
the_alias_of_andrea
f59m5mk
<|soss|><|sot|>PHP gc_probability/gc_divisor<|eot|><|sost|>According to [PHP Manual](https://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability): > **session.gc_probability** > session.gc_probability in conjunction with session.gc_divisor is used to manage probability that the gc (garbage col...
6
lolphp
barubary
f598i61
<|soss|><|sot|>PHP gc_probability/gc_divisor<|eot|><|sost|>According to [PHP Manual](https://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability): > **session.gc_probability** > session.gc_probability in conjunction with session.gc_divisor is used to manage probability that the gc (garbage col...
6
lolphp
Takeoded
dekmu1
<|soss|><|sot|>socket_accept() returns false on error<|eot|><|sost|>[documentation](https://www.php.net/manual/en/function.socket-accept.php) says: > Returns a new socket resource on success, or FALSE on error. The actual error code can be retrieved by calling socket_last_error(). This error code may be passed to sock...
16
lolphp
Takeoded
f2wtbk0
<|soss|><|sot|>socket_accept() returns false on error<|eot|><|sost|>[documentation](https://www.php.net/manual/en/function.socket-accept.php) says: > Returns a new socket resource on success, or FALSE on error. The actual error code can be retrieved by calling socket_last_error(). This error code may be passed to sock...
8
lolphp
nikic
f2x5go9
<|soss|><|sot|>socket_accept() returns false on error<|eot|><|sost|>[documentation](https://www.php.net/manual/en/function.socket-accept.php) says: > Returns a new socket resource on success, or FALSE on error. The actual error code can be retrieved by calling socket_last_error(). This error code may be passed to sock...
5
lolphp
phplovesong
cvla8i
<|sols|><|sot|>Vote for PHP++ was rejected 0-52. Not even to original "designer" voted for it.<|eot|><|sol|>https://wiki.php.net/rfc/p-plus-plus<|eol|><|eols|><|endoftext|>
17
lolphp
shitcanz
ey4xkvh
<|sols|><|sot|>Vote for PHP++ was rejected 0-52. Not even to original "designer" voted for it.<|eot|><|sol|>https://wiki.php.net/rfc/p-plus-plus<|eol|><|sor|>This was a hilarious vote. PHP seems to be in a kind of dead zone. PHP has neither a vision or a future plan. It seems some core devs want to make it more typed...
13
lolphp
skawid
8lszl2
<|soss|><|sot|>I thought we were past this<|eot|><|sost|> <?php var_dump(array(0 => ':p1') == array(0 => 0)); // bool(true) Ten years and this language is still finding ways to kick me in the nuts. I mean, I get it. An array is equal if its keys and elements are equal. And `:p1` is, in the PHP sense, equal to ...
17