subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
lolphp
Takeoded
g2cjz2g
<|sols|><|sot|>breaking-to-fix in_array() for PHP8: OK. breaking-to-fix DateTime::ISO8601 for PHP8? no can do (DateTime::ISO8601 is not legal ISO8601)<|eot|><|sol|>https://3v4l.org/B0Jqh<|eol|><|sor|>Well the thing is that it is a valid ISO8601 format: > [Time zones](https://en.wikipedia.org/wiki/Time_zone) in ISO 860...
7
lolphp
barubary
cx3e70
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
25
lolphp
teizhen
eyi7mwq
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
17
lolphp
oldskater
eyidkpo
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
17
lolphp
captainramen
eyja60d
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
13
lolphp
barubary
eyic7fu
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
7
lolphp
barubary
eyia47n
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
7
lolphp
geerlingguy
eyj1tdw
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
7
lolphp
barubary
eyjii9a
<|soss|><|sot|>Commenting out code<|eot|><|sost|>Commenting out a chunk of code is unnecessarily hard in PHP. Consider the following code snippet, hypothetically analyzing a piece of PHP in PHP: <?php $code = '...'; // ... // PHP comments can have the form /* ... */ or // ... or # ... $code = st...
5
lolphp
pgl
2yk2sq
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|eols|><|endoftext|>
22
lolphp
pgl
cpa86zh
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|soopr|>Explanation: the reason for this behaviour is that `__get()` uses the internal `__isset()`, which returns false on a protected variable.<|eoopr|><|eols|><|endoftext|>
19
lolphp
kingguru
cpa97cu
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|soopr|>Explanation: the reason for this behaviour is that `__get()` uses the internal `__isset()`, which returns false on a protected variable.<|eoopr|><|sor|>But how can var_dump() access a protected member in the first place? The setBar(...
15
lolphp
pgl
cpa9cdw
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|soopr|>Explanation: the reason for this behaviour is that `__get()` uses the internal `__isset()`, which returns false on a protected variable.<|eoopr|><|sor|>But how can var_dump() access a protected member in the first place? The setBar(...
13
lolphp
pgl
cpb90jd
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
12
lolphp
cite-reader
cpaiq6e
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
7
lolphp
pgl
cpb9cvl
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
6
lolphp
pgl
cpb9i4r
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
6
lolphp
cparen
cpe62hk
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
5
lolphp
cite-reader
cpaqeqw
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
5
lolphp
edave64
cpaqzxz
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
5
lolphp
loptr
cpask2p
<|sols|><|sot|>empty() vs __get()<|eot|><|sol|>http://ideone.com/RVw5XK<|eol|><|sor|>I don't understand what you're objecting to here. empty() does exactly what it's supposed to, i.e. ignoring any virtualisation and looking for a literal property. It checks for the actual variable. This is literally the exact point of...
5
lolphp
midir
2qhkca
<|soss|><|sot|>PHP warns about incompatible methods only if you also define the classes child-first<|eot|><|sost|>PHP's strict standards mode can tell you if you have overridden a method with a different number of arguments. For example, [the following shows an error](https://eval.in/237299) because `test()` is not com...
24
lolphp
barubary
cn6id6m
<|soss|><|sot|>PHP warns about incompatible methods only if you also define the classes child-first<|eot|><|sost|>PHP's strict standards mode can tell you if you have overridden a method with a different number of arguments. For example, [the following shows an error](https://eval.in/237299) because `test()` is not com...
15
lolphp
nyamsprod
27vvu1
<|sols|><|sot|>Can someone explain this ?<|eot|><|sol|>http://3v4l.org/WZeAI<|eol|><|eols|><|endoftext|>
22
lolphp
merreborn
ci50uiy
<|sols|><|sot|>Can someone explain this ?<|eot|><|sol|>http://3v4l.org/WZeAI<|eol|><|sor|>all non-numeric strings == 0 (int)'UNLOCK' == (int)0<|eor|><|eols|><|endoftext|>
16
lolphp
gearvOsh
ci4yvic
<|sols|><|sot|>Can someone explain this ?<|eot|><|sol|>http://3v4l.org/WZeAI<|eol|><|sor|>[removed]<|eor|><|sor|>What does a constant have to do with this? There isn't one in the example.<|eor|><|eols|><|endoftext|>
8
lolphp
sloat
1wdk4h
<|sols|><|sot|>"If you call var_export() on an instance of stdClass, it attempts to export it using ::__set_state(), which, for some reason, is not implemented in stdClass."<|eot|><|sol|>http://www.php.net/manual/en/function.var-export.php#113962<|eol|><|eols|><|endoftext|>
23
lolphp
Deranged40
cf12c7u
<|sols|><|sot|>"If you call var_export() on an instance of stdClass, it attempts to export it using ::__set_state(), which, for some reason, is not implemented in stdClass."<|eot|><|sol|>http://www.php.net/manual/en/function.var-export.php#113962<|eol|><|sor|>> So I wrote an improved_var_export() Fuck fixing it. just ...
25
lolphp
allthediamonds
cf154q4
<|sols|><|sot|>"If you call var_export() on an instance of stdClass, it attempts to export it using ::__set_state(), which, for some reason, is not implemented in stdClass."<|eot|><|sol|>http://www.php.net/manual/en/function.var-export.php#113962<|eol|><|sor|>> So I wrote an improved_var_export() Fuck fixing it. just ...
20
lolphp
_sgtk
cf18v6l
<|sols|><|sot|>"If you call var_export() on an instance of stdClass, it attempts to export it using ::__set_state(), which, for some reason, is not implemented in stdClass."<|eot|><|sol|>http://www.php.net/manual/en/function.var-export.php#113962<|eol|><|sor|>For the sake of consistency, (s)he should've named it var_re...
13
lolphp
poizan42
cf21iks
<|sols|><|sot|>"If you call var_export() on an instance of stdClass, it attempts to export it using ::__set_state(), which, for some reason, is not implemented in stdClass."<|eot|><|sol|>http://www.php.net/manual/en/function.var-export.php#113962<|eol|><|sor|>...and? It doesn't work for any class which doesn't. What is...
5
lolphp
neoform
1nq2n1
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
22
lolphp
ANAL_GRAVY
ccl7i2r
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
24
lolphp
neoform
ccl40vb
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
18
lolphp
steamruler
cclh62t
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
15
lolphp
mirhagk
ccmhvrl
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
10
lolphp
maxufimo
cckzke7
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
8
lolphp
Porges
ccl6hon
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
7
lolphp
Ipswitch84
ccl7bow
<|soss|><|sot|>Google Analytics in PHP Examples<|eot|><|sost|>https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#booya function getTransactionJs(&$trans) { return <<<HTML ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation':...
6
lolphp
Kwpolska
1gx0gr
<|sols|><|sot|>PHP 5.5.0 brings generators with good syntax!<|eot|><|sol|>http://php.net/manual/en/language.generators.overview.php<|eol|><|eols|><|endoftext|>
24
lolphp
afraca
caoue0n
<|sols|><|sot|>PHP 5.5.0 brings generators with good syntax!<|eot|><|sol|>http://php.net/manual/en/language.generators.overview.php<|eol|><|sor|>To me this seems as sort of a good thing, or am I missing something here? The syntax is similar to that of python. <|eor|><|eols|><|endoftext|>
12
lolphp
philsturgeon
cazyur4
<|sols|><|sot|>PHP 5.5.0 brings generators with good syntax!<|eot|><|sol|>http://php.net/manual/en/language.generators.overview.php<|eol|><|sor|>To me this seems as sort of a good thing, or am I missing something here? The syntax is similar to that of python. <|eor|><|soopr|>Everyone and their mom had generators for ag...
7
lolphp
ealf
cate4dk
<|sols|><|sot|>PHP 5.5.0 brings generators with good syntax!<|eot|><|sol|>http://php.net/manual/en/language.generators.overview.php<|eol|><|sor|>> If you use yield in an expression context (for example, on the right hand side of an assignment), you must surround the yield statement with parentheses. For example, this i...
6
lolphp
Liorithiel
caow8eb
<|sols|><|sot|>PHP 5.5.0 brings generators with good syntax!<|eot|><|sol|>http://php.net/manual/en/language.generators.overview.php<|eol|><|sor|>To me this seems as sort of a good thing, or am I missing something here? The syntax is similar to that of python. <|eor|><|sor|>Probably the numbers. My installation of pytho...
5
lolphp
nikic
capqinr
<|sols|><|sot|>PHP 5.5.0 brings generators with good syntax!<|eot|><|sol|>http://php.net/manual/en/language.generators.overview.php<|eol|><|sor|>To me this seems as sort of a good thing, or am I missing something here? The syntax is similar to that of python. <|eor|><|sor|>Probably the numbers. My installation of pytho...
5
lolphp
isotopp
1bx54o
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|eoss|><|endoftext|>
21
lolphp
midir
c9ay85x
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|sor|>To state it more plainly: var_dump(min(-23, true)); // int(-23) var_dump(min(true, -23)); // bool(true) Apparently this is a feature of boolean to nu...
24
lolphp
farsightxr20
c9b2fgf
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|sor|>> NEVER EVER use this function with boolean variables !!! I think the fact that ...
22
lolphp
Porges
c9b906k
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|sor|>> NEVER EVER use this function with boolean variables !!! I think the fact that ...
19
lolphp
farsightxr20
c9bca0o
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|sor|>> NEVER EVER use this function with boolean variables !!! I think the fact that ...
13
lolphp
vytah
c9b63f1
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|sor|>> NEVER EVER use this function with boolean variables !!! I think the fact that ...
10
lolphp
Packet_Ranger
c9b5w64
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|sor|>> NEVER EVER use this function with boolean variables !!! I think the fact that ...
9
lolphp
isotopp
c9awf3i
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|eoss|><|endoftext|>
8
lolphp
catcradle5
c9bat11
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|sor|>> NEVER EVER use this function with boolean variables !!! I think the fact that ...
7
lolphp
nikic
c9c7smw
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|sor|>To state it more plainly: var_dump(min(-23, true)); // int(-23) var_dump(min(true, -23)); // bool(true) Apparently this is a feature of boolean to nu...
6
lolphp
mirhagk
c9b4fbb
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|sor|>To state it more plainly: var_dump(min(-23, true)); // int(-23) var_dump(min(true, -23)); // bool(true) Apparently this is a feature of boolean to nu...
6
lolphp
catcradle5
c9bc4kn
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|soopr|>See also http://www.php.net/manual/de/function.min.php#65516<|eoopr|><|sor|>> NEVER EVER use this function with boolean variables !!! I think the fact that ...
6
lolphp
midir
c9cl0an
<|soss|><|sot|>MIN<|eot|><|sost|> server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";' 1 -23 -23 1 <|eost|><|sor|>To state it more plainly: var_dump(min(-23, true)); // int(-23) var_dump(min(true, -23)); // bool(true) Apparently this is a feature of boolean to nu...
5
lolphp
Altreus
w9wpa
<|soss|><|sot|>Came across this compile-time fun today<|eot|><|sost|>As we all know, many languages allow you to use the boolean operators to do a shorthand if-type construct: do() or die(); PHP is the same. EXPR or EXPR generally works, as does EXPR and EXPR. The problem is that the RHS of these expressions app...
25
lolphp
vytah
c5bq5gm
<|soss|><|sot|>Came across this compile-time fun today<|eot|><|sost|>As we all know, many languages allow you to use the boolean operators to do a shorthand if-type construct: do() or die(); PHP is the same. EXPR or EXPR generally works, as does EXPR and EXPR. The problem is that the RHS of these expressions app...
10
lolphp
more_exercise
c5cyo2f
<|soss|><|sot|>Came across this compile-time fun today<|eot|><|sost|>As we all know, many languages allow you to use the boolean operators to do a shorthand if-type construct: do() or die(); PHP is the same. EXPR or EXPR generally works, as does EXPR and EXPR. The problem is that the RHS of these expressions app...
5
lolphp
ezzatron
rj9o7
<|sols|><|sot|>5.3.9 adds $allow_string to is_a() and is_subclass_of(), breaks BC just 'cause, and uses $allow_string to control autoloading... _<|eot|><|sol|>http://php.net/manual/en/function.is-a.php<|eol|><|eols|><|endoftext|>
21
lolphp
farsightxr20
c46ajth
<|sols|><|sot|>5.3.9 adds $allow_string to is_a() and is_subclass_of(), breaks BC just 'cause, and uses $allow_string to control autoloading... _<|eot|><|sol|>http://php.net/manual/en/function.is-a.php<|eol|><|sor|>Lol, all they had to do to preserve BC was default it to true instead of false.<|eor|><|eols|><|endoftext...
10
lolphp
petdance
pi6wv
<|sols|><|sot|>To encode special characters, use htmlentities(). To decode, use html_entity_decode(). Who needs orthogonality?<|eot|><|sol|>http://www.php.net/manual/en/function.htmlentities.php<|eol|><|eols|><|endoftext|>
23
lolphp
Rhomboid
c3ponav
<|sols|><|sot|>To encode special characters, use htmlentities(). To decode, use html_entity_decode(). Who needs orthogonality?<|eot|><|sol|>http://www.php.net/manual/en/function.htmlentities.php<|eol|><|sor|>The default charset for `htmlentities` wasn't UTF-8 until 5.4, so the shortest way to do it *right* without cor...
18
lolphp
gearvOsh
c3pptst
<|sols|><|sot|>To encode special characters, use htmlentities(). To decode, use html_entity_decode(). Who needs orthogonality?<|eot|><|sol|>http://www.php.net/manual/en/function.htmlentities.php<|eol|><|soopr|>Never mind orthogonality, I'd settle for consistent use of underscores.<|eoopr|><|sor|>On top of that, I would...
8
lolphp
petdance
c3pjyvn
<|sols|><|sot|>To encode special characters, use htmlentities(). To decode, use html_entity_decode(). Who needs orthogonality?<|eot|><|sol|>http://www.php.net/manual/en/function.htmlentities.php<|eol|><|soopr|>Never mind orthogonality, I'd settle for consistent use of underscores.<|eoopr|><|eols|><|endoftext|>
7
lolphp
annoymind
k1age
<|sols|><|sot|>This is a tale of an integer overflow vulnerability in PHP.<|eot|><|sol|>http://use.perl.org/~Aristotle/journal/33448<|eol|><|eols|><|endoftext|>
24
lolphp
Rhomboid
c2gyjot
<|sols|><|sot|>This is a tale of an integer overflow vulnerability in PHP.<|eot|><|sol|>http://use.perl.org/~Aristotle/journal/33448<|eol|><|sor|>`sizeof(char)` is 1 by definition on every platform, regardless of how many actual bits are in a char. That must have been a comedic flourish, as I struggle to believe that ...
11
lolphp
Takeoded
j8ql4s
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
24
lolphp
elcapitanoooo
g8dke1m
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
12
lolphp
Perdouille
g8d1swj
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
10
lolphp
Takeoded
g8eja2y
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
9
lolphp
smegnose
g8fpbdo
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
8
lolphp
Takeoded
g8de1x7
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
6
lolphp
elcapitanoooo
g8g6ssn
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
6
lolphp
Takeoded
g8gdyq0
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
6
lolphp
elcapitanoooo
g8gtp8d
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
6
lolphp
elcapitanoooo
g8g5wok
<|soss|><|sot|>hash_init() & co is a clusterfuck<|eot|><|sost|>here is what a sensible hash_init() implementation would look like: ```php class HashContenxt{ public const HASH_HMAC=1; public function __construct(string $algo, int $options = 0, string $key = NULL); public function update(string $data):void...
5
lolphp
Mmarco94
692jwj
<|sols|><|sot|>ob_clean resets some headers when the output is buffered<|eot|><|sol|>https://stackoverflow.com/questions/43768383/php-ob-startob-gzhandler-with-ob-clean-error<|eol|><|eols|><|endoftext|>
22
lolphp
Max-P
dh3j1bg
<|sols|><|sot|>ob_clean resets some headers when the output is buffered<|eot|><|sol|>https://stackoverflow.com/questions/43768383/php-ob-startob-gzhandler-with-ob-clean-error<|eol|><|sor|>gzipping the output in PHP alone is pretty lolphpusers too considering every web server out there will do it transparently. Using ob...
14
lolphp
the_alias_of_andrea
dh3fgv7
<|sols|><|sot|>ob_clean resets some headers when the output is buffered<|eot|><|sol|>https://stackoverflow.com/questions/43768383/php-ob-startob-gzhandler-with-ob-clean-error<|eol|><|sor|>This looks like a StackOverflow question that should really be a bug report.<|eor|><|eols|><|endoftext|>
10
lolphp
nyamsprod
37caox
<|sols|><|sot|>parse_str behavior is sometimes strange<|eot|><|sol|>http://3v4l.org/23nkR<|eol|><|eols|><|endoftext|>
22
lolphp
weirdasianfaces
crljd4d
<|sols|><|sot|>parse_str behavior is sometimes strange<|eot|><|sol|>http://3v4l.org/23nkR<|eol|><|sor|>Could someone tell me a sane use case for `parse_str`?<|eor|><|sor|>> Parses str as if it were the query string passed via a URL **and sets variables in the current scope**. (if the second parameter `$arr` is not pro...
10
lolphp
profmonocle
crm7cp7
<|sols|><|sot|>parse_str behavior is sometimes strange<|eot|><|sol|>http://3v4l.org/23nkR<|eol|><|sor|>Could someone tell me a sane use case for `parse_str`?<|eor|><|sor|>> Parses str as if it were the query string passed via a URL **and sets variables in the current scope**. (if the second parameter `$arr` is not pro...
10
lolphp
weirdasianfaces
crm7ps9
<|sols|><|sot|>parse_str behavior is sometimes strange<|eot|><|sol|>http://3v4l.org/23nkR<|eol|><|sor|>Could someone tell me a sane use case for `parse_str`?<|eor|><|sor|>> Parses str as if it were the query string passed via a URL **and sets variables in the current scope**. (if the second parameter `$arr` is not pro...
6
lolphp
i_make_snow_flakes
2md8c0
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
23
lolphp
00Davo
cm36h9l
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
26
lolphp
00Davo
cm3rccg
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
16
lolphp
Rhomboid
cm3h6pd
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
15
lolphp
ElusiveGuy
cm38dmt
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
12
lolphp
i_make_snow_flakes
cm39v3i
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
10
lolphp
i_make_snow_flakes
cm3bggg
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
9
lolphp
i_make_snow_flakes
cm3bwyh
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
9
lolphp
i_make_snow_flakes
cm3cnp0
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
6
lolphp
i_make_snow_flakes
cm3cyw4
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
6
lolphp
i_make_snow_flakes
cm3e01b
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
6
lolphp
ElusiveGuy
cm39ruc
<|soss|><|sot|>new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..<|eot|><|sost|>[here](http://www.reddit.com/r/PHP/comments/2m85jr/rfc_safe_casting_functions_v014/cm24cfr) the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What d...
5
lolphp
andsens
2ej1j1
<|sols|><|sot|>stdClass is truthy while an empty SimpleXMLElement is falsey<|eot|><|sol|>http://3v4l.org/3hWSY<|eol|><|eols|><|endoftext|>
22
lolphp
andsens
ck02i6u
<|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