« first day (3508 days earlier)      last day (1423 days later) » 
00:00 - 22:0022:00 - 00:00

12:00 AM
And FYI, I am way older than Star Control II
 
how would i go about controlling deployment of node.js apps on a server with php and still be able to query those apps from the php app? is this even possible? :(?
 
through HTTP? Or some other protocol, sure.
 
okay
i am thinking http
i really have no idea on how to go about this
any thing related to this i can study?
 
http is traditional
 
 
8 hours later…
7:51 AM
o/
 
 
1 hour later…
8:55 AM
anybody online
???
 
hey
 
So, I want to know if there is such an operator that'll do both And/Or and will return true if both are true or one is true?
 
Why dont you use || or or operator ??
 
but will it return true if both conditions are true ?
 
yep...
 
8:58 AM
oh
thx :)
 
welcome
 
OR does both XOR is only when one of the two conditions is true
 
umm halp with my code
$fnln=$_POST['fnln'];$url=$_POST['url'];$pwd=$_POST['pwd'];
$fnlnc=str_word_count($fnln);$urls=strpos($url, "https"."&#58"."&#47"."&#47");$pwdc=str_word_count($pwd);
$fnlni=isset($fnlnc);$urli=isset($urls);$pwdi=isset($pwdc);

if ($fnlni==true && $urli==true && $pwdi==true && $fnlnc==2 && $urls==true && $pwdc==1) {
echo "<script>alert('Succesful')</script>";
} elseif ($fnlnc<>2 || $urls==false || $pwdc<>1) {
echo "<script>alert('Please follow the directions (Enter a url only and only 2 names and a one-word password)')</script>";
its not showing what i want it to
when i enter a url and password and name matching conditions for alerting succesful its still saying follow directions
hello?
 
can you explain what you want to do in simple words its easier than watching this code.
 
oh srry
so
i will enter a firstname lastname
then a url that must contain https://
and a one word password
bello
afk
 
9:14 AM
are you encoding the special characters in url check its value
 
bello?
yes i have checked
58 is colon
and 47 is forward slash
hello?
 
well i get the raw url in the test. not sure but maybe ur missing ; in url
 
whats that for?
 
@OmerHijazi Why its encoded in html in the first place??
 
what do you mean
 
9:20 AM
from your link, the page is uploading url encoded data
no html
 
@aXuser264 i guess thats not the prob at all cuz i tried replacing that condition with "test" and entered test in url but still not working
 
as a financial question, is "paypal" a "mastercard" ?
 
nope
The main difference is you don't have a nice convenient card to take with you around to millions of stores or anywhere you shop online. ... MasterCard is a credit card and PayPal is an e-wallet!
dont ask such stuff here please
room-11.github.io
@aXuser264 helo
 
@OmerHijazi hi. You aren't a room owner. Offtopic stuff is allowed so long as it's not disrupting more useful conversations.
 
im just saying that such stuff should be asked on php related chats
shouldn't*
 
9:28 AM
no. off topic is allowed. But disruption isn't.
@Shafizadeh what do you mean by mastercard? That could mean the company, the card, or the payment settlement platform.
 
Ah I see .. thanks @OmerHijazi
 
@OmerHijazi check this line `strpos($url, "https"."&#58"."&#47"."&#47")` its supposed to return the pos of `https://` right??
if its 0 then your logic results false `$urls==true` cause its `$urls === 0`
 
so it should be ===0
?
 
got it @Danack
 
yah,
 
9:29 AM
ok
nope
 
tested with
```
firstlastname: A X
url: https://whatever/
pwd: youshouldtnkow
```
and it works
note: i changed strpos($url, "https://")
cause i still get raw url in my php
 
9:50 AM
@NikiC we're having a lot of "method_exists(): Argument #1 ($object_or_class) must be of type object|string, XXX given" to fix to make Symfony compatible with PHP8. Yet none of these changes look valuable. Can't we relax method_exists() and make it accept any value as 1st arg?
 
I have trouble understanding why you are passing something not a string or an object to that function tho
 
@NicolasGrekas I was also going to ask about that. Can you link to an issue that shows the problem in context?
 
@Danack sure, here you are: bugs.php.net/79623
 
method_exists() is too strict in PHP 8 ・ *General Issues ・ #79623
 
> TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given
I still can't see exactly what you're passing there. Or why you think it should be acceptable.
 
10:02 AM
Is that meant to be a callable from an object?
Cause that's whack
 
actually, @NicolasGrekas please can you update the bug report to have the needed info in it.
asking people to trawl through your log files is not a concise bug report.
> What was announced by Google Cloud yesterday was a series of strategic partnerships with leading open source-centric companies in the areas of data management and analytics. The companies are an all-star cast of sorts: Confluent, DataStax, Elastic, InfluxData, MongoDB, Neo4j, and Redis Labs.
 
We'll comment on the bug report once we have more details.
 
cool.
 
So the example above passed in an array, so sure that makes sense... Probably should fail... However on line 4930 null is given:
TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given
the method_exists takes an instance or a class name as arg #1... so what if the class doesn't exist? Probably don't pass in a non-existent class but if it allows strings it should allow null and return false...
 
A method cannot exist on "null", and a null check is quicker than a method check, also if you get null into that function something is broken
 
10:19 AM
True, I suppose we shouldn't build the platform to support lazy coding.. Part of me still doesn't like that a function that returns a boolean causes an error and not a warning.

The more I think about it, returning false on a 'randomMethod' on null is not good, since false is an expected and valid response from method_exists. Haha it's literally half of the responses.
 
We passed an RFC to have consistent type errors, I see no point in having a warning and having a bogus return just so that you can ignore code which seems to be clearly broken
 
@CodeJunkie I recommend turning strict mode on for your code. And setting up an error handler that converts all errors/warnings to exceptions.
 
It would be cool if we could pass in an array of object (string) object names and match against that haha.

I'm not experiencing this problem. It's hard to even conceptualize why this is even a discussion as you don't write broken code... Except sometimes you do hahaha

This is only an issue with PHP 8? How did previous versions handle this? Why would this build pass on 7.x.x?
 
We made PHP 8 stricter so that we can add type declarations to functions
 
@NicolasGrekas The justification for the request is that "we're having a lot of ... to fix to make Symfony compatible with PHP8. Yet none of these changes look valuable."? So none of the changes required look valuable, that being, you're writing more code to validate type before passing to method_exists and that's inconvenient? I know Symfony is quite a large framework but how many times have you used that function with arrays and null inputs?
If this doesn't allow null and array inputs, what is the value in code that allows arrays and null in method_exists? Is this used frequently in interface implementation validation?
 
10:38 AM
Hey anyone know any func to decode and encode http deflate msg,
After googling the answers i found they work good with browser but those cant decode its own encoded data... (sucks took long to figure)

hard time converting other source to php
have any php func for that??
 
@aXuser264 pretty sure that in this case gzip and deflate are the same - so php.net/manual/en/function.gzcompress.php
 
@aXuser264 you should probably just try that code and see if it works. I'm pretty sure you're more likely to have a gzip data, rather than a raw deflate message. Unless you don't.
 
ok already trying again
nah getting WebSocket connection to 'ws://x.x.x.x:y/' failed: Invalid frame header
i think the decoder func i use can decode properly, But The encoder isnt right,
can you help me with encoder??
 
10:51 AM
probably not. If you want help you should post a Short, Self Contained, Correct , Example somewhere, so people can see what you're trying to do. But I am kind of busy.
 
i got
function unseal($socketData) {
$length = ord($socketData[1]) & 127;
if($length == 126) {
$masks = substr($socketData, 4, 4);
$data = substr($socketData, 8);
}
elseif($length == 127) {
$masks = substr($socketData, 10, 4);
$data = substr($socketData, 14);
}
else {
$masks = substr($socketData, 2, 4);
$data = substr($socketData, 6);
}
$socketData = "";
for ($i = 0; $i < strlen($data); ++$i) {
$socketData .= $data[$i] ^ $masks[$i%4];
}
return $socketData;
}

function seal($socketData) {
$b1 = 0x80 | (0x1 & 0x0f);
seal and unseal func
unseal func decodes browsers deflated msg just properly
seal also works with browser
But, for script connection, when i use unseal on seal ed func It Doesn't work, bad decode (Probably corrupted data)
 
you should probably use something like gist.github.com for posting code..... and that example you're following seems ....not so good. Maybe you should look at amphp.org
 
sorry
But i was practicing using sockets with bultin php func
So, i everything is ok, I just need this encoder
 
11:25 AM
Anybody who knows the opcodes well, what is the right approach here?

var_dump($foo?->bar()->baz());

This currently generates the following opcodes:

0000 INIT_FCALL 1 96 string("var_dump")
0001 JMPNZ null 0004
0002 T0 = QM_ASSIGN null
0003 JMP 0009
0004 INIT_METHOD_CALL 0 null string("bar")
0005 V1 = DO_FCALL
0006 T0 = QM_ASSIGN V1
0007 INIT_METHOD_CALL 0 T0 string("baz")
0008 V2 = DO_FCALL
0009 SEND_VAR V2 1
0010 DO_ICALL

In function ::{main} (before dfa):
var op1 of 1 (ZEND_SEND_VAR) does not use/def an ssa var
Theses are actually the opcodes for var_dump(null?->bar()->baz()); (null instead of $foo).
 
11:43 AM
Hi all
I have this code which returns matched plan id object but it is returning array of object.
Here this is what I am expecting-
planDTO Object
(
      [eventId] => 2
      [planId] => 2
      [name] => employee only
)
 
@IluTov what you're working on is way beyond my skills, so this might be a stupid question but; you almost certainly want the null-safe stuff to work exactly the same as if $foo?->bar(); was replaced with if ($foo !== null) {$foo->bar();}. Isn't that something that can be done at the abstract syntax tree level, rather than the opcode level?
 
12:01 PM
@Danack Hm, maybe. I'll try it, if it works it would be quite a lot simpler :) I would need a temporary variable that can't clash with userland variables.
var_dump(null?->bar()?->baz());

var_dump(
    (null !== $1 = null
        ? (null !== $2 = $1->bar()
            ? $2->baz()
            : null),
        : null),
)
Not sure if there are such temp variables.
 
@IluTov it might be less maintenance work long term, if it is possible to do it like that. Or more.
"a temporary variable that can't clash with userland variables." - put a ^ before stackoverflow.com/a/17973365/778719
Or not "In general you should make no assumptions about which characters names in PHP can contain."
 
12:21 PM
@Danack Hm, but "Variable names can be arbitrary strings:" 3v4l.org/VAtZ9
Ah i see, "But the regex restricts only these "direct" uses of names. Through various dynamic features PHP provides it's possible to use virtually arbitrary names." I'll try that, thanks @Danack
Actually, I'm still not sure if that variable could still be accessed through ${}, I'll just try it :)
 
And this is still beyond stuff I should be commenting on....but isn't this the block problem again? in the sense that you kind of want to evaluate a block of code and 'return' a value from it.
 
@Danack Not sure that I follow :) Maybe I'm missing something
 
12:37 PM
if PHP did have inline blocks like you kind of needed for the match RFC, then:
$x =  $foo?->bar();
would be equivalent to:
$x = {
    if ($foo === null) {
        return null;
    }
    else {
        return $foo->bar();
    }
}
or whatever syntax was used for blocks.
I'm just seeing a similarity in the problem. Maybe not that useful a thing.
 
@Danack I guess similar yeah but since we already have the ternary op I'll just transform it to that :)
 
12:56 PM
actual drama in PHP land - github.com/php-ai/php-ml
 
1:08 PM
er, wat
 
> The Github user GPC-debug (github.com/GPC-debug) fork my public repo(github.com/hon-key/goodbuiness) which now is a private repo and will be remove soon. Since The repo contains the company's important source code, algorithm and system configuration infomation belonging to the companys internal data asset, we hope this fork can be remove from Github.
that's an important source of renewable drama.....
 
The DCMA take down notice link is gone though: github.com/github/dmca/blob/master/2020/05/…
 
lol - I randomly looked at the latest notice merged to the DMCA repo: "I posted some code to StackOverflow and someone used it to create a library!" github.com/github/dmca/commit/…
 
@AllenJB yeah. I'm just about to open a question on meta about that.
 
1:30 PM
@IluTov You'll want to introduce a new opcode that basically does the reverse of COALESCE
Or possibly change COALESCE to accept two jump addresses
Or maybe not quite that. Probably a jump on null that returns null and does not free op1 would be easiest for this case.
 
1
Q: Responding to DMCA takedowns

DanackCurrently the github repo https://github.com/wearejust/laravel-amp is unavailable due to a DMCA takedown notice. The copyright claim is for code posted as an answer on stackoverflow Even ignoring the general terrible nature of the DMCA, this appears to be a bogus takedown notice as the code cov...

 
1:46 PM
@Danack no proper dictionary of request headers, have to access through $_SERVER["HTTP_FOO_BAR"], or through getallheaders() which, unfortunately, 1) is not available in all SAPIs (IIRC), 2) in some SAPIs is a horrible hack which does not preserve the case of the headers. Likewise header() is nasty btw.
 
@Andrea thanks. I should have included a link to where I'm storing them: github.com/Danack/RfcCodex/blob/master/better_web_sapi.md
"a[b" => $_REQUEST["a_b"]
"a]b" => $_REQUEST["a]b"]
ftw
 
@Danack 😰
 
@Danack lol
 
what are you plotting here? Writing a custom FastCGI thingie in userland?
 
Me? Plot?! Outrageous innuendo!
So......anyway. Been thinking a lot about how some aspects of PHP, while they work they are just quite painful. One of them that keeps coming back is the shitty nature of the PHPFPM sapi. I can't see how to improve it piece by piece.
 
1:53 PM
I think it's time to put the strict operators RFC to a vote. Any comments, tips, thoughts, etc?
 
@ArnoldDaniels you really should leave more than 2 minutes between replying to someone and opening voting.
 
Discussion has been open for something like 6 month hasn't it?
 
More or less. I've made a lot of adjustments based on the initial discussion. The latest version hasn't been discussed much.
 
@Andrea I think there can be made a good argument for having a new sapi that is maybe a bit harder to use, but allows programs to be more correct. But also.....there's a discussion to tie in with packages and extensions. Having extensions really only be installable to system directories is just a pain.
 
1:57 PM
@ArnoldDaniels You might want to check for overlap with wiki.php.net/rfc/arithmetic_operator_type_checks
 
Having some sort of system where PHP can install all the dependencies for a project, without needing to touch system directories would make life be a lot easier. Although it's hard to say exactly why Pecl isn't good enough, the fact that almost no-one uses it is a really bad sign.
 
@Danack btw I think you should separate the concerns of cleaning up the SAPIs and cleaning up the PHP functions and superglobals for accessing request stuff
they are independent (even if complementary) imo
 
@ArnoldDaniels I really suspect the RFC is too big for people to easily digest, and people have been skipping reading the details. I don't have a great suggestion on how to address that. But one thing you do need to do imo is to update the RFC to make it clear what the vote is.
the current text is:
Proposed Voting Choices
Voting ended prematurely and will be reopened at a later stage targeting PHP 8.
as changing the proposed vote is a non-trivial change to the RFC, you probably should allow people time to digest what you're actually saying is the questions.
@Andrea entirely possible. On the other hand.....it might be one of those cases where solving two big problems at once makes it easier to solve both of them. In particular, it dodges the problem of BC breaks, and gives people a strong reason to upgrade.
 
@Danack I've reduced it to a yes/no vote removing the choices, to make that part less complex.
I can reduce the size of the motivation and try to reduce the text overall. However, it will always be a relatively big RFC I'm afraid.
 
One thing that would make it clearer would be to say the proposal more clearly in text rather than by example.
> All comparison operators work with int, float and bool type operands. The types of both operands need to match.

Strings, resources, arrays, objects and null only support the ==, ===, != and !== operators.
vs
> All comparison operators work with int, float and bool type operands. The types of both operands need to match. If the operands are of different types, a type error will be thrown.

Strings, resources, arrays, objects and null only support the ==, ===, != and !== operators. Attempting to use an unsupported operand on these types will give a typerror.
if you put it somewhere that supports PRs it would be easier to suggest edits.
> If 1, strict type-checking mode is used for operators in the the file. If 0, weak type-checking mode is used.
That would be better as:
> If strict type-checking is not enabled, there will be no change from the current behaviour of PHP. If strict type-checking is enabled, the following stricter rules will be used.
....hey there's an @igorw o/
 
2:25 PM
@Danack I've created a repo; https://github.com/jasny/php-rfc-strict-operators/blob/master/rfc.txt
The docuwiki format isn't supported by GitHub, so I might need to convert it to markdown.
Also; feel free to edit the RFC directly to improve the readability.
 
ahahahah - voluntarily touch docuwiki? you're funny.
 
yeah yeah... I'll ping you when I've converted it to markdown
 
btw one question to think about. Why shouldn't people 'just' implement this with PHPstan/psalm?
also - don't have time to clean this up but: gist.github.com/Danack/33a0dbd2f1812c4a15e95b620ee123a4
does most of the conversion.
 
> Most arithmetic operations throw an Error if one of the operands is an array. But modulo and exponentiation operations will cast (to 0 or 1) and thus succeed silently.
>
> Objects and resources are always cast to integers or floats. In case of an object, this results in a notice. For resources, this will succeed silently using the resource id as a number.
@ArnoldDaniels ^-- this is no longer true
You should be able to drop that whole section actually
 
@Danack :waves:
 
2:33 PM
Similarly the link in the "All combinations" section. And that section seems to have a few duplicate bullet points.
typo "in the the file"
typo "in strict modes"
"Strings, resources, arrays, objects and null only support the ==, ===, != and !== operators." => Contradicts later statement on arrays
@ArnoldDaniels For arrays, have you considered making == use recursive == semantics with a structural equivalence prereq?
That is, [0, 1] == [0, 1] is true, [0, 1] == [0, 2] is false, [0, 1] == [0, "1"] is TypeError (int == string), [0] == [0, 1] is TypeError (structural mismatch)
@ArnoldDaniels Do I understand right that your object == comparison works by doing element-wise comparison with the weak == ?
That is, without enforcing type equality?
 
@NikiC I have. I would make strict operators more complex and I'm not sure if it's useful.
 
That seems pretty inconsistent / surprising. I would expect it to use the type-strict == for each property (and thus match the array semantics I suggest above)
 
No, it does enforce type equality.
 
@ArnoldDaniels That doesn't seem to match the " In the following examples, the == results in false when strict_operators is used and true otherwise; " examples
 
So that's a change in behavior between strict_operators on and off.
 
2:44 PM
To be clear, I mean "enforce type equality" in the sense of throwing on mismatching types here, not returning false on mismatching types
 
I misunderstood
The RFC takes the stance that two objects of the same class can be compared using == without throwing a TypeError.
 
> Arithmetic operators will only work with integers and floats.
Does that include `%` as well? Will it accept floats and cast to int?
 
> When strict-type checking for operators is enabled, the switch statement will do a comparison similar to a comparison on arrays
This sentence doesn't make a lot of sense now that array comparisons are not allowed
 
@NikiC The idea is that type casting / throwing a TypeError is only based on the type of the operand, never the value. But I can reconsider.
 
2:50 PM
More generally, why not use === for switch=
 
@NikiC thnx, I'll change that text
@NikiC Yes, though switch is a big change in behavior. Maybe I should add it back as secondary vote.
Ok, It's clear I have some work to do on the RFC :-)
 
it only to the attributes RFC 7 goes to get through.
 
@ArnoldDaniels Overall I still like the idea of the proposal, but the details are really tricky :(
There doesn't seem to be any great choices when it comes to comparison operators
 
Yes, I'm very aware of that.
I like the idea of @Danack of putting the RFC in a GitHub repo and collaborating on those details.
 
Let's say this proposal goes in and we're all happily using strict_operators=1 ... what would be the usage guideline for == vs === ?
@ArnoldDaniels by the way, can you please clarify what the result of 10 == 10.0 is? I don't think it's mentioned
 
2:57 PM
== is used for numeric comparison, similar to >, <, <=>, etc
The one exception is that widening primitive conversion is allowed for int to float. This means that parameters that declare float can also accept int.
@NikiC So it will be compared as float.
(resulting in true)
 
Okay, that's what I would expect. I'd explicitly repeat that in the comparison section, because that seems like the main differentiation from === where practical usage of the operators is concerned
Which kinda makes me wonder whether it might make sense to give == the same limitation as < and make it only for numbers?
 
3:13 PM
@ArnoldDaniels this is a tangent - imo github does not have adequate controls against people being idiots to be used for dicsussion.
it's good for pullrequests though.
 
3:33 PM
Morgens people
 
\o
 
o/
 
@PeeHaa what do you mean 'people'?
 
:)
 
people.php.net
 
3:44 PM
@Danack with regards FPM and SAPIs, I wonder how far a cleanup can/should go without somehow moving towards a more event/async model
http2 server-push, websockets, and all that jazz
I realise that's just making the job more complex, but it would be awkward to spend a year writing a new SAPI, try to persuade people to migrate to it, and then find everyone's ignoring FPM and running Swoole or whatever anyway
 
FPM is going to remain the king for a long time yet unless Swoole can find a way to make statics work.
 
yeah, eliminating global state is not a trivial change
 
Aye, I push my high performance APIs through Swoole, but I do them on a single thread and leverage it for a lot of caching and global state manipulation. But I can't see moving the rest of my code to it.
 
but at some point there's a limit to what we can clean up without leaving CGI behind
 
But for now i'm happy enough pushing 2000+ requests per second through swoole on half a core.
 
3:54 PM
@Danack Edited our 46 mins down to 24mins just now. We talked a lot!
 
4:30 PM
Suuuuper long shot, but is there anybody who understand CSS and willing to have a look at this jsfiddle.net/jg9Lod6u
The div should overflow without a scrollbar :|
I need wesley in here :(
 
@PeeHaa what do you mean with overflow here?
 
@bwoebi The div is wider than the nav. I need it to break out of the nav without a scroll bar
 
@PeeHaa so you want to position the div absolutely?
relative to the nav
 
If I remove overflow-y: auto; it works like I want, but that also means I don't have a vertical scrollbar when needed
absolute has the same behavior
I get a scrollbar
I don't want the horizontal scrollbar
But for some reason overflow-y also adds that one
WHich is weird to me
 
applying any overflow to an element makes it a scrollable area
 
4:37 PM
I thought overflow-{direction} only applied it for that specific direction :(
 
@PeeHaa I also thought so until I had the same problem last week :-D
 
Is there any way css magic to make my example work?
 
shouldn't the overflow be on the child, not the parent?
 
so, you want overflow-x: hidden?
 
No as hidden will cut the contents
@IMSoP ?
 
4:41 PM
@PeeHaa so you want to have the nav expand to fit the width of your div?
 
No :)
If you remove the overflow-y you can see what I want to happen
In the fiddle
 
ah
 
However I cannot just remove it as I need the overflow when the content needs to scroll vertically
If that makes sense
 
> Note: Setting one axis to visible (the default) while setting the other to a different value results in visible behaving as auto.
it doesn't really explain why that's the case; possibly a consequence of the earlier note that it "creates a new block formatting context"
 
ugh
Does that mean there is no solution for this?
So weird that I have never been hit by this before
 
4:44 PM
@PeeHaa yes and no
 
@IMSoP at the risk of making a prediction, I think a shared nothing server is still going to be a useful thing in another 20 years.
but if anyone has any knowledge of an example nginx + phpfpm setup for handling streaming incoming requests, that's something I don't currently understand that I think should be included on the notes at least.
 
@bwoebi Can I pick one? :P
 
@Danack @Danack yeah, probably; I just wonder if there's a way that the bindings and the userland experience can be more similar between event-based and shared-nothing, rather than continuing to emulate CGI forever
like, shared-nothing is just a script that's guaranteed to receive exactly one event
 
5:09 PM
@PeeHaa well, you can make the nav span a bit wider and have a transparent background for everything > 200px
 
@bwoebi That will result in a horizontal page scrollbar on mobile
:(
Unless I hide that too I guess
But yeah :|
Stupid css
 
@PeeHaa but well, then it would give you a horizontal scrollbar anyway?
because the inner div has 500px width?
 
True
/me dicks around the rest of the long weekend with css :(
 
I'm going to close wiki.php.net/rfc/non-capturing_catches unless someone tells me not to. Or races me.
 
<nav>
  <div style="height: 100%;width: 200px;background: red;position: absolute;z-index: -1;"></div>
  <div style="height: 100px;width: 500px;background: green;"></div>
</nav>
@PeeHaa so sort of like that
 
5:17 PM
Might also dump something on SO main I guess
Although I am pretty sure there indeed is no simple / neat solution for it
 
and then you add nav { pointer-events: none; } nav > * { pointer-events: auto; } so that users can click through the transparent area of the nav
@PeeHaa there just isn't - applying any overflow just boxes its contents to the bounds of the parent element.
 
Yeah. Thanks for looking into css on your day off for me :)
 
@PeeHaa CSS is not bad if you understand its limitations
 
5:57 PM
@NikiC Thanks! Quick question: Do you guys generally prefer new opcodes or using multiple existing ones? New ones have a higher maintenance burden as you need to add support to the VM, optimizer and JIT but I'd think they're a little faster. In this case I would've just used a TYPE_CHECK followed by a JMPZ instead of creating a new opcode. Or is there something I'm missing?
 
6:10 PM
I actually got a working prototype, I'll clean it up and post it tomorrow so you can tell me what I'm doing isn't completely insane :)
 
@IluTov depends on the complexity. If a single opcode can coalesce four different ones, then probably a new opcode. If it's just two opcodes, then most probably not.
 
anyone fancy a bet on how many tests fail if I re-build PHP with this:
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -419,7 +419,7 @@ finish:
                smart_str_appends(&req_buf, "\r\n");
                efree(protocol_version);
        } else {
-               smart_str_appends(&req_buf, " HTTP/1.0\r\n");
+               smart_str_appends(&req_buf, " HTTP/1.1\r\n");
        }

        if (context && (tmpzval = php_stream_context_get_option(context, "http", "header")) != NULL) {
answers in an hour or so when make test completes
 
Hello
 
6:52 PM
@IMSoP so much +1 for taking on http2 in php natively, good ml post
 
Jeez there is SO MUCH CRUFT in zend_strtod
 
@IluTov You can't reuse existing opcodes due to operand freeing
You need a non-freeing branch
At least I think so, happy to be wrong about that
@IMSoP lol, you're assuming we have tests for that :P
 
@ArnoldDaniels Thanks for working on the strict operators RFC! I'm looking forward to it very much. :)
 
(We do, but not a lot)
@Girgias bundled library and some of the most horrible code I've ever seen. Best not touch it
 
@NikiC too late, I've managed to clean up some of it and it compiles and works... will throw in a PR soonish
 
7:01 PM
@NikiC Thanks for the ping about the upgrading note. I noticed that I missed to add it, but I ain't got time for that yet. And thanks to George for helping me out :)
 
np :p I needed to do one myself
 
@NikiC Can I ask you for some code reviews next week? I'll start to step on my own toes soon. If you have priority tasks before the feature freeze, please ignore my request :)
 
@MátéKocsis Yes... I feel like I do little but code review nowadays and still not keeping up...
 
Well we are flooding you with PRs, so it's also understandable
 
7:16 PM
:Nikic Yeah, I can totally understand you :/ It's so unfortunate that you are basically the only person who has to go through all the code we produce. And I appreciate your efforts very much!
 
@NikiC My tests do work. Some existing tests fail now due to string memory leaks, I'll have to look into that.
What does the ZEND_OP_DATA opcode do? I can't find a handler for that one.
 
7:27 PM
Oh, got it, it passes additional values to an instruction.
 
Wait...why are we not just using strtod?????
 
7:49 PM
json constant russian lng ・ Translation problem ・ #79624
 
8:12 PM
 
any idea what's "GmbH"? Google-translate doesn't have any meaning for it and I guess I've seen that word in this room
 
It's an abbreviation of a German word for a business, I forget the word exactly
 
@Shafizadeh its the german equivalent of a limited
 
ah, it means "limited" in German?
 
A Gesellschaft mit beschränkter Haftung ([ɡəˈzɛlʃaft mɪt bəˌʃʁɛŋktɐ ˈhaftʊŋ], abbreviated GmbH [ɡeːʔɛmbeːˈhaː] and also GesmbH in Austria), meaning "company with limited liability", is a type of legal entity very common in Germany, Austria, Switzerland (where it is equivalent to a société à responsabilité limitée) and Liechtenstein. It is an entity broadly equivalent with the private limited company in the United Kingdom and many Commonwealth countries, and the limited liability company (LLC) in the United States. The name of the GmbH form emphasizes the fact that the owners (Gesellschafter, also...
 
8:21 PM
@Tiffany yes this one
 
ah I see .. thanks
 
8:41 PM
> Typed properties must be initialized before accessing. If a typed property is accessed prior to initialization, a fatal error occurs.
going to open a PR and use github for doc change :O
 
Wes
9:17 PM
\o
 
Internal classes in docs or parse error ? ・ OCI8 related ・ #79625
 
9:49 PM
i have a Symfony controller that I'm trying to refactor to make it clean. this is what i have so far
public function application(
	Request $request,
	UserService $userService,
	ApiWrapper $api,
	ParameterBagInterface $parameterBag,
	ApplicationService $applicationService,
	ShoppingCartService $cartService
): Response {
	$user = $this->getOrCreateUser();
	$errors = [];

	if ($request->getMethod() == 'GET' && !$request->getSession()->get('security_token')) {
		$securityToken = $api->getSecurityToken()->getArrayResponse();
		$request->getSession()->set('securityToken', $securityToken);
	} else {
		$securityToken = $request->getSession()->get('securityToken');
this is for a user to apply for a new lease. they POST some information, i hit a 3rd-party API, and i redirect them to the 3rd-party API's website.
as you can see, the function is quite big.
i know i could abstract grabbing the security token to its own class (e.g. $securityTokenService->getSecurityToken()), but i'm wondering how you guys would clean up the error-handling. before I had nested IF/ELSE statements and refactored it to try/catch
but now i have a long list of different errors that i need to handle and display custom messages for
 
at a glance, I think the error-handling part is quite nice - it's directly related to this particular action
the parts that feel verbose are all the jumping around between $application and $form
 
right, the form is a bit tied to the controller in Symfony--i need to use the createForm method of the AbstractController
since i need to pass my form to the view
the parts that i can potentially abstract out of the controller would be

1) the grabbing of the security token (this is required by the 3rd-party to prevent fraud)
2) updating the user based on the submitted application
public function application(
	Request $request,
	UserService $userService,
	ApiWrapper $api,
	ParameterBagInterface $parameterBag,
	ApplicationService $applicationService,
	ShoppingCartService $cartService,
	SecurityTokenService $securityTokenService
): Response {
	$user = $this->getOrCreateUser();
	$errors = [];

	$securityToken = $securityTokenService->getSecurityToken();

	$application = new Application($parameterBag->get("store_id"), $securityToken['session_id']);
	$form = $this->createForm(ApplicationForm::class, $application, ['user' => $user]);
idk if i can clean this up anymore
but my function feels quite large
 
oh, I've also just noticed the early return nested deep in the middle there; feels a bit inside out
since that's actually the happy path
 
00:00 - 22:0022:00 - 00:00

« first day (3508 days earlier)      last day (1423 days later) »