« first day (3560 days earlier)      last day (1370 days later) » 

12:26 AM
Hmm. zend_get_zval_ptr has a type parameter that is unused. I assume it was used in previous versions or something, but the thing is that in master it already had signature changes so shouldn't we just remove it?
 
Probably yes
But may be disruptive? I don't know how much it is used
 
Its signature was already changed so I vote for removing it. /cc @NikiC
 
 
1 hour later…
1:37 AM
while you're at it you could change the op_type to zend_uchar
Actually not sure going by the constants are defined huh
 
1:53 AM
Also, it sort of implies it fetches for every type of access since it is ignored? Or maybe only reads or something?
 
2:03 AM
@NikiC Do includes use the op_array_extension? I either have garbage that happens to point something valid, or it does get used for something.
(gdb) p observer_handlers
$2 = (void *) 0x7ffff5c82ee0 <__funlockfile>
Also, can anyone educate me about ZEND_OVERLOADED_FUNCTION? I see it in the code base sometimes but don't know what it is, other than it's not a user nor internal function.
Also also, anyone know what the zend_execute_data for ZEND_RETURN of a require looks like? Seems like all its fields are un-initialized... not sure how to inspect it to know if it should be observed or not...
 
3:06 AM
It appears that the func of the execute_data points to... 0x3.
I'm guessing we are tagging the least significant bits as extra options or that it is a dummy pointer, though I can't find it.
 
 
2 hours later…
4:55 AM
Assertion `(flag & (1<<3)) == 0' in _zend_hash_add_or_update_i ・ Scripting Engine problem ・ #79862
 
 
3 hours later…
7:46 AM
Being woken at 2:30 in the morning is brought to me by, the sounds of my cat puking on my bed
 
@LeviMorrison Isn't that removed in master?
@IluTov heh, symfony tests are a sea of ParseError: syntax error, unexpected token "match", expecting identifier or "{" now
@LeviMorrison done
 
8:15 AM
@Tiffany WAT, poor thing
@NikiC oops, because of function match() usages?
 
@IluTov what new problems did you encounter with nullsafe?
 
8:29 AM
@bwoebi Cannot support assignment to nullsafe
 
8:47 AM
@NikiC what case exactly fails? in the pr I see some tests for exactly that?
 
thanks
 
@beberlei either she's sick or she's protesting me limiting their food because my other cat has gained weight and I'm trying to get him to lose weight
Or it's a bit of both
I do need to clean their water fountain though
 
9:02 AM
Timezone conversion result depends on environment ・ Date/time related ・ #79863
 
 
1 hour later…
10:24 AM
JIT segfault in Symfony OptionsResolver ・ opcache ・ #79864
 
 
2 hours later…
11:56 AM
Morning, all!
 
12:22 PM
@NikiC Nicolas votes yes so... not my fault :D
@bwoebi shudders
 
12:36 PM
I'm just gonna leave this here... solveq.io/blog/what-is-php-used-for
 
12:53 PM
@IluTov Well… Maybe you should just drop nullsafe on the LHS of an assignment. I mean, is that case even that valuable?
just emit a compiler error
 
1:06 PM
@IluTov do you need help to get nullsafe done on time?
 
1:24 PM
@IluTov Apparently PHPUnit has a class called "PHPUnit\Framework\MockObject\Builder\Match" :)
 
How do one build and enable the zend_test extension for the test runner?
 
@Girgias --enable-zend-test?
 
Indeed...
I thought there were some shenanigans to do
Wait, there is no way to enable the tokenizer extension after a --disable-all? Cause --enable-tokenizer doesn't seem to work
 
@Girgias that should work
@MátéKocsis You have opened Pandora's box of parameter name bikeshedding :P
 
1:39 PM
Huh, weird, I did a sapi/cli/php -m and it didn't showed up, did it again and now it appears
not gonna try to understand how that happened
 
morns
 
1:55 PM
!!rfcs
 
@Jeeves Love these simple RFCs where you can just vote "yes"
 
@NikiC Will you put https://wiki.php.net/rfc/string_to_number_comparison to a vote for PHP 8.0?
In that case, I'm withdrawing my strict_operators directive RFC.
 
@ArnoldDaniels I plan to start the vote on Friday
no idea if it will pass tho
 
@NikiC Ah, you are right. What was it?
@NikiC Thank you!
 
2:08 PM
@LeviMorrison no idea ^^
There was some special call_method (vs get_method) object handler back in the day that I think used it
 
@NikiC I'm still confused as to how I'm meant to approach the throw_on_error declare thing, do I need to use FC() to update the op_array? And if so am I meant to check the following op_array EG(current_execute_data)->func->op_array ? Or is another one the relevant one
Cause that seems to mostly work, except it doesnt
 
@NikiC It takes solving issues with non-strict comparisons in a different direction. Having both RFCs in voting doesn't seem right.
 
@NikiC Have you any thoughts on @MarkR's Ext proposal for the namespace RFC
 
2:25 PM
@Girgias You should only need to set an fn_flag
Which op_array you need to check depends on context
You'll probably want to walk up to the first non-internal execute_data and take the function from there
 
Wasn't that the issue with strict types? I seem to remember looking for the loop that crawled up the execute data but couldn't find it.
 
@NikiC I might have an hour or two tonight, otherwise tomorrow. I'll make the adjustments in the RFC first, announce the adjustments, work on the implementation and then start the vote a day or two later (by Saturday or Sunday). It's pretty hectic to say the least :D
@bwoebi That's the plan.
@NikiC Help is definitely appreciated. There's github.com/iluuu1994/nullsafe-operator-rfc/blob/v1/rfc.md, I can give you permission to edit. Same with my Github branch.
I'll try to make it in time but the time I have to work on it is pretty limited on working days.
 
@beberlei and @SammyK: here is the new observer PR. It's not been rigorously tested yet but supports require/include/eval and userland function calls.
 
Currently I added a member op_array->throw_on_error which worked mostly fine (as I imagine that's *more or less* the same as setting an fn_flag) but I was indeed hitting context issues

I also now see that the fn_flags get "propagated" to func.common.fn_flags which is maybe why i was hitting the issue
 
Notably I have a bug (sigsegv) on .end for require/include (but not eval).
Also cc @Derick
It includes an observer extension which I don't intend to ship, but useful for seeing how it works!
 
2:49 PM
sup?
 
Just letting you know about the revamped observer API (was instrumentation API).
 
ah
quite a few todo's and commented out bits :-D
 
@LeviMorrison could I test this on my wordpress setup or does everything require not work yet?
 
Only 3 todos; they just get duplicated because 2 of them are in the zend_vm_def.h ^_^
@beberlei You will probably sigsegv if you instrument .end of require/include. Aside from this there aren't known issues.
Not yet, anyway. Without a good test suite one cannot know.
The third todo is a strange build failure if I include the observer header in a certain file.
 
3:00 PM
any chance to get github.com/php/php-src/pull/3758 finally merged? It's only been three years and the bug only open since 2012.
 
oh well there's a good 2 years of the review phase left then
honestly, you're so impatient
 
I know
 
lol
 
3:19 PM
yesterday, by moliata
Found this gem the other day https://wiki.php.net/rfc/nikita_popov
 
Hi guys! Lot of things changed in php (I'm so happy about it) and I'm not certain if its good idea to run long running process in php (2 hours at max), so I came here to find the answer :), BTW we run 7.4+, as far as I understood php is meant to run short time processes.
 
that was long enough ago that I don't remember what created it (or that it was me) ... and was funny to read ...
 
@NikiC Is there an "easy" way to check if the execute_data is internal or not? Probably a dumb question, I imagine execute_data.opline.handler != NULL might be one way but that seems huuuu weird?
 
@VeeeneX Biggest concern is holding onto memory for longer than you should.
 
@Girgias Check execute_data->func->type
 
3:21 PM
@NikiC Is there a list on what the values of type correspond to?
 
@Girgias Check zend_compile.h INTERNAL_FUNCTION and whereabouts
 
@NikiC Assuming it has a func :)
 
@LeviMorrison That might be a problem because I'm reading xml and publishing messages to Kafka, but that consumes only ~64mb ram
 
@NikiC Thanks for the pointer, cause I was looking in the dark
@LeviMorrison Well it should have but I'll need to check for that anyway
 
@VeeeneX php is perfectly fine for long running processes
 
3:23 PM
@VeeeneX Just monitor your memory over time.
 
@NikiC I know that you rock :D :), but I'm not really into internals of php :D
 
@VeeeneX Sorry, pinged the wrong person ;)
 
My idea is to spawn a container with this import that will execute that process :)
@NikiC Uff :D xD
 
@VeeeneX fwiw I have PHP processes running for months at a time. It's really just a question of how badly implemented the libraries you're using are :)
 
@NikiC Months!? Awesome, I'll try to keep it minimal since it's microservice, but thanks a lot
 
3:31 PM
hey guys
got a bit stuck here.
How can I make this string an array:
string(880) "[{"img":"pm.png","sort_order":7,"caption":""}
like this
[0]=>
  array(3) {
    ["img"]=>
    string(97) "pm.png"
    ["sort_order"]=>
    int(3)
    ["caption"]=>
    string(0) ""
  }
 
@winresh24 json_decode, the the "assoc" argument
 
Thanks will check that
 
Minor Service Outage ・ Gists has Partial Outage
Incident on 2020-07-15 15:41 UTC ・ Gists has Partial Outage
 
4:00 PM
@NikiC I knew :) :) I've already got a few other changes locally, but I'll have to reconsider them, based on your comment
@NikiC BTW have you ever failed a vote? I can't remember any :D
 
I would like to apply json_encode to all form inputs. Would it be that way to do this? json_encode($_POST)?
 
@Tiago Through array_map_recursive
 
4:18 PM
Great GitHub is seemingly down
Travis is not fetching the branch for a CI run
 
yeah.. and the Closes GH-xxxx is also not triggering
 
cmb
yup :(
 
sigh
 
will it eventually trigger or should I close it manually?
I'll give it some time.. :)
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Gists has Partial Outage
 
4:27 PM
It's all buggered.
 
:-)
@MarkR So.... I'm not sure what we want to do with the namespace RFC. There seems to be little interest in even responding. :-/
 
@NikiC If you were to work on it, let me know so we don't work on the same thing ^^ I'll start with updating the RFC right now.
 
@Crell what's your thought on \Ext, include it or not?
 
My main concern is that it introduces a user-facing distinction between "Core" and "bundled extension" that never existed before.
And creates the same rename problem when things go from extension to core or vice versa, although I suppose that is less common.
Also... how often do PECL extensions migrate into core without getting rewritten anyway? :-)
 
We wouldn't moved them
If we put \Ext\Gd\Image and GD for some inexplicable reason gets moved out of core, it stays \Ext\Gd\Image and \Ext effectively becomes an internal-managed namespace for core + pecl
and we leave \PHP for engine and data structures
 
4:44 PM
I mean the other way around.
Sodium, for instance.
 
Let's sat it started off as \Ext\Sodium and then we bring it into core... it would remain \Ext\Sodium
 
@MarkR +1. For extensions like sodium, use \Ext\Sodium with aliases to the prior, say \Paragon\Sodium.
 
It still provides the central objectives of limiting the scope for trampling over userspace, and allows logical grouping of related classes.
 
Right, but such extensions generally get heavily altered anyway. So is keeping the same name even wise?
 
We don't typically provide different namespaces for differing APIs of the same product
e.g. its Symfony\HttpKernel not Symfony\HttpKernel2, HttpKernel3 etc. I know some do, but it's rare.
 
4:49 PM
But the argument for using Ext in both cases is to avoid needing to update user-space code that relies on it. But if the API changes anyway, is there really any benefit?
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage
 
They're conflicting requirements IMO. Either you want to move things in and out at will without user change, or you want to go making major API breaks in which case all the code would need to be re-written anyway, requiring user change
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Gists has Partial Outage
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage
 
There is no ideal solution. :-) As I said, I don't have a particularly large horse in this race other than having people not fight about it in the future, so if the consensus is to go with Ext, I'm not going to get mildly wounded on that hill.
 
Which does github even have different sections for their outages
 
4:55 PM
There is no perfect solution
great minds :P
 
Jinx!
 
THeir system is either working or on fire
 
Is it still Ruby?
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Gists has Partial Outage
 
@Crell Id say it's more likely to pass with \Ext than without, if we (or you) added it to the RFC and give examples of what's \PHP (e.g. core annotations, tokenizer etc) vs extension
 
4:57 PM
Let me see if I can find time today to edit it.
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Gists has Partial Outage
 
They should rename it GitwreckedHub
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage
 
@Crell Pretty sure it is
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Gists has Partial Outage
 
5:00 PM
Insert language snark here.
 
Incident on 2020-07-15 15:41 UTC ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage
 
@IluTov Nope, haven't done anything. Currently working on match support in PHP-Parser :P
@MátéKocsis I know it is hard to believe, but I do have some failed votes ;)
 
gasp
 
... I think. I can't remember a specific one right now :P
 
@MarkR @NikiC Should we establish an actual registry for claimed namespaces, or just let the RFCs be the claiming mechanism and if a PECL module gets duplicated with something, oh well.
 
5:03 PM
@Crell I think we should just throw a wiki page up for the registry, it's simple and easy... you use a NS that you didn't reserve, tough titties if it gets used
 
Any concerns about domain squatters?
Other than RFC, how would a PECL module "claim" a namespace?
 
I think avoiding the term "registry" may help with the "OMG So Complicated" brigade
 
s/registry/index/ if it makes you happy. :-)
 
A post to internals should do, give people the opportunity to object
E.g. someone wanting to claim \Ext\Redis for something other than the existing Redis would get rejected.
 
Who decides what is "rejected"?
 
5:05 PM
"these are our naming conventions; the document over here is the official list of prefixes, please keep it up to date"
 
(These are the sort of details that can result in hours of fighting if not addressed in advance, hence why I bring them up.)
 
maybe if anyone objects it has to go to a quick RFC?
that's kind of what happens with patches that are borderline right now: raise PR, ask on list if anyone objects, don't bother with RFC if nobody does
so if someone tries to claim "Ext\EatMyShorts", and somebody replies on the list "that's a bit rude", the original author can just write a one-paragraph RFC and get it voted on
 
I'd be open to that approach if others are.
 
again, this should be framed as a quick consensus check in the rare event of dispute, rather than some great bureaucratic process that will stop anyone getting their work done
 
I have no problem with that, objections should be rare at most and IMO most people won't bother to register them unless they're creating something quite significant
 
5:16 PM
@IMSoP Sometimes you need to describe a simple process in detail to emphasize its simplicity, or it will get complicated. :-)
 
absolutely, I'm just thinking of certain people on list who seem to think we're taking away their freedom to write code
 
(I've been doing online governance management in some form for >20 years. Under-specifying and over-specifying are equally dangerous risks.)
I think we also include that, in case of collision, bundled extensions have priority over RFCed extensions over registered extensions over whatever-else.
 
Aye, all of this is supplementary to the main goal really but probably necessary, so long as we achieve the desired outcome of providing a more reasonable way of logically grouping classes et al for the next 20 years vs the root dumpster
 
Though I suspect many PECL extensions will just skip Ext and use \Mongo\Blah, which... I suppose is fine from our perspective.
And then if those want to move into core, they get to be renamed, kthxbye.
 
cmb
@Crell no, they've rewritten everything in PHP 8 on Windows :p
@Crell we already have a registry: PECL
 
5:30 PM
@cmb I asked my client but they declined my request, didn't want third parties accessing the resources. Would be happy to try and put some of my own hardware together and throw it in my rack if beneficial.
 
I'll be away from keyboard for an hour or two
 
@cmb I know nothing about how PECL is managed. Does presence in PECL indicate approval to claim a namespace?
 
pecl has names attached to it
would make sense that anything in pecl has the \ext\xxx by default
 
@Crell No such approval is conferred.
 
Some time back I thought I heard discussion about stripping all extensions except core out of php-src and having it dedicated entirely to the engine. Was that an actual thing or am I just hallucinating?
 
5:58 PM
@MarkR I don't remember that ever being discussed.
 
6:09 PM
How can I insert and select at the same time?
$rsG = $mysqli->query("SELECT * FROM formas_gateway WHERE chave = '".$_SESSION['chave']."'");

if ($rsG->num_rows == 0){

    $mysqli->query("INSERT INTO formas_gateway VALUES (NULL, '".$_SESSION['chave']."', 'Test', NULL, 'D' ) ");

    $rsG = $mysqli->query("SELECT * FROM formas_gateway WHERE chave = '".$_SESSION['chave']."'");

}
 
is it standard to wrap regex expressions in "#" instead of "/" e.g. #[A-Za-z]+#
instead of /[A-Za-z]+/
 
It's a common alternative delimiter - useful if the pattern contains / to reduce escapes
 
@Tiago I'm not exactly sure what your intention is, but you may be better off looking into some of the more advance SQL queries or possibly UNION
Nested SQL queries can be a work of art
 
@Tiago There's no way to insert a record and select it in a single query. You can obtain the (autogenerated) primary key of the record just inserted tho: php.net/manual/en/mysqli.insert-id.php
 
Minor Service Outage ・ Issues, PRs, Dashboard, Projects has Partial Outage
 
6:24 PM
Aside: You should use prepared queries to ensure values in queries are correctly escaped: php.net/manual/en/mysqli.prepare.php
 
All issues have been resolved!
 
You can use select to create a temp table as part of an insert, but not select from the data being inserted.
 
6:39 PM
that's mariadb only, but nowadays I stopped targeting mysql anyways :-D
 
@IluTov I'd be a bit more explicit about issues with supporting write context (apart from the technical side, just the ambiguity of what is evaluated)
I'd also mention unset() explicitly (is that supported or not?) I saw that JS supports that case (delete), though apparently more because it's harder to forbid than allow
 
@NikiC unset does not matter in PHP though as we anyway short circuit it?
 
@bwoebi It could matter for something like unset($foo->bar()?->baz).
Though I do think it shouldn't be supported
@IluTov I think you can also combine the write context and reference section. References are just a special type of write context. So it's consistent that all of this is forbidden.
 
Write context implies references, but references have their own issues. Wouldn't necessarily merge them and I think it's clearer for the reader that way
 
@bwoebi okay
 
7:14 PM
@RobertCalove I like using @
 
@Derick I prefer () and I just consider it capturing group 0
Always used # before until I discovered that matching parens work also
Even saves you having to pass the extra arg to preg_quote
 
@bwoebi TIL.
 
@NikiC Ok I will mention unset. I think it should be forbidden since we now disallow anything else that's mutating the variable.
 
7:33 PM
Yeah, ( works too
 
@Danack there's a wide range of delimiters, like 10 of them, including <>, (), {}, []
eih, not 10 … like 200 of them
 
@bwoebi Parens actually make a lot of sense, since they already have special meaning and need to be escaped anyway. I've always used ~ since that's the least common character in regex for me. Also, numeric capture groups are terrible :P
 
8:04 PM
Regexes are terrible.
 
@Crell Regex is awesome :) if used for the right things.
 
They can be awesomely useful and terrible at the same time.
 
8:40 PM
Is it me or is heap.space down?
 
up for me.
 
Okay good to know
ping: https://heap.space: Name or service not known
Seems to be completely dead for me O.o
 
165.22.73.128 maybe add it to your hosts file temporarily.
dns looks fine here.
 
9:05 PM
Requiring a file twice with require doesn't reload anonymous classes ・ *Compile Issues ・ #79865
 
Interesting, but why do people write code that finds such bugs? lol
 
9:18 PM
I think that has already been fixed, they're probably on some old version
@IluTov Regex is even more awesome when used for the wrong things ;)
 
cmb
@Crell every PECL package needs to have its own name, and AFAIC there is no relevant name clash with any of the bundled extensions (there is the very old PECL/ffi which is not directly related to ext/ffi, but the former is abandoned for more than a decade). So the name could serve as namespace name (okay, there are some packages which have a dash in their name, but that could be replaced by underscore for the namespace; don't think there'd be a real problem).
@MarkR having a dedicated build VM for 8.0 would be great, of course. But there is no urgent need, so take your time, and don't feel obliged to do anything. :)
 
@NikiC So maybe we can replace bison with a giant regex ^^
 
@cmb When I have a few i'll see if I can install Windows 10 on a VM or if it'll complain at me.
 
cmb
ta
 
9:40 PM
@LeviMorrison i get an error, distcleaned and everything :( /usr/bin/ld: Zend/zend_execute.o: in function `zend_dispatch_try_catch_finally_helper_SPEC':
/home/benny/code/projects/php/php-src/Zend/zend_vm_execute.h:2567: undefined reference to `zend_observer_maybe_fcall_call_end'
 
I saw this failure in CI, but did not have anything locally.
Let me try to fix it
I strongly suspect zend_always_inline isn't inlining here.
 
9:52 PM
@beberlei I just pushed a potential fix.
 
I just love how the first 10 minutes of the windows experience is clicking "No" to a thousand screens wanting permission to harvest my data
only for it to come to a "we're going to do it anyway because you're not running enterprise sucka!"
 
10:09 PM
@LeviMorrison actual fix
i forgot where i put the empty dummy observer extension ...
 
@beberlei I would just edit ext/observer/observer.c.
 
@LeviMorrison ah right
 
10:31 PM
@LeviMorrison really not measureable in valgrind
0.11% both with and without OBSERVER_DEBUG set
on my wordpress
 
@beberlei On all calls?
That's basically impossible; something isn't set up right I think.
Are you sure you build ext/observer? For instance if you built with a disable-all you'd have to explicitly enable it.
 
@LeviMorrison resuls are weird indeed
ok so 16% overhead in instructions on callgrind for the wordpress index page with observer printing everything (except the requires)
rerunning it 10 times (php-cgi)
 
10:58 PM
@Danack It was my router which was doing something weird, I couldn't access some other stuff too, but also had a small Windows issue sooo took a while to fix everything
 
down to 4% instructinon ovheread when just instrumenting one often used function
@LeviMorrison this is with a new if (getenv("OBSERVER_DEBUG")) around zend_observer_fcall_register in MINIT
i need to check with a php compiled without the whole observer code
 
You should try bench.php too
 
hm is it right that no observer registered at all compared to not having the code is not measurable?
 
Can someone on MacOS try github.com/Girgias/php-src/pull/2 and run the following test: Zend/tests/throw_on_error/declare_statement_isolated.phpt cause it Termsig=11 but not on Linux
 
11:25 PM
Do we have an enable-everything configure string for building master on win?
 
cmb
configure --enable-snapshot-build
 
Ty @cmb. Will that do the optimizations and such that take a long t ime?
 
cmb
That's a multi-step process, described in detail at github.com/microsoft/php-sdk-binary-tools#pgo
For snapshot builds that's automated with github.com/php/web-rmtools
 
11:43 PM
Ty @CMB. Do you have a recommendation on how much RAM I would need to feed this?
 

« first day (3560 days earlier)      last day (1370 days later) »