« first day (3561 days earlier)      last day (1387 days later) » 

12:13 AM
@beberlei It should be very low overhead; it checks operations against an integer to see if the op_array_extension has been done before it does any significant work.
@NikiC I was curious about != 0 vs != -1 and found this answer on SO. The compare with 0 can be encoded with test, but -1 cannot, so yes, 0 is marginally shorter and faster.
Really talking micro-optimization here :)
 
 
1 hour later…
1:32 AM
Took around 32 minutes to run a single build but I'd say a good 80% of that the CPU never went above a single core.
 
 
5 hours later…
6:08 AM
Hi
Can anyone help me
 
@Vinayak sure whats up
 
cmb
6:33 AM
@MarkR 8GB should be sufficient. Currently, we always do 4 builds in parallel (NTS/ZTS, x86/x64).
 
@NikiC This statement is very suspicious if you don't remember any ^^.
 
user12640521
7:19 AM
Hi, I was just interested in the named arguments feature coming in php 8. Was there ever any discussion on using a Dart line approach? Where you have to explicitly specify which parameters are named and which not?
 
7:56 AM
@NikiC Ambiguity as in lhs has to be evaluated before rhs, but also kind of the other way around?
Or is it something else you meant.
 
@IluTov yes
 
@NikiC Ok. I'll try to explain that in an understandable way. Adjusting the code was straight forward.
 
Well, basically just that there might be conflicting expectations about whether the RHS gets evaluated
 
@NikiC Ok (y) To me it was very obvious that it should not but I have not considered that not everybody might feel that way.
 
Good morning, all.
 
8:02 AM
\o
 
8:39 AM
@IluTov okay to rebase the nullsafe branch?
 
@NikiC Sure
@NikiC Should isset work on nullsafe directly?
 
@IluTov shouldn't it?
 
@NikiC If we consider ?-> producing an "r-value" then no right? At least that's what I expected.
 
@IluTov Let's avoid that terminology
PHP does not have r-values and l-values
PHP has expressions and variables, where variables can be writable or not
Nullsafe would for me fall into the non-writable variable category
 
@NikiC Thus the quotes ^^ But yeah that works for me. :)
 
8:53 AM
@IluTov What do you think should happen for this case? github.com/php/php-src/pull/5619/commits/…
I believe this one shouldn't error, but also shouldn't modify the array, unless there are pre-existing references
 
@NikiC :think: Good point, I would've expected an error like with =&.
 
@IluTov foreach is a bit of a special case, it never errors
Because foreach by reference can make sense even on non-writable variables due to interior references (e.g. a generator by reference)
 
@NikiC Ok, in that case, how would we prevent $foo?->bar from becoming a reference?
 
@JellyLegend the main problem with opting into named parameters is that libraries couldn't start adding them until they'd dropped support for PHP 7 (because whatever syntax we came up with wouldn't compile under PHP 7)
since libraries tend to support more versions than applications that consume them, it tends to be easier to add new syntax for calling functions than for defining them
 
9:09 AM
got an old version of the code, nvm
ah nikita fixed it :-D
 
@JellyLegend it has been discussed, however with the extensive existing standard API, its becomes a humongous task, since one goal is improving the usage of internal APIs
 
user12640521
@IMSoP Right, didn't think of backwards compatibility... Although, it really depends whether libraries used them. What I mean by this is if there are a lot of lets say single parameter methods or from array methods there isn't much benefit from named parameters. Right now I have the stripe-php library in mind.
 
user12640521
@IMSoP The way I see it is named parameters are useful only when there are a lot of parameters involved, and for some core php functions str_replace, ... with sometimes not so easy parameter orders. And don't get me wrong I want named parameters and I'd be great to have them enabled by default by all native PHP functions. I'm just not so confident in letting this feature out in the wild without some form of regulation.
 
user12640521
@beberlei I'm not sure I understand.
 
@JellyLegend your approach would require someone go through the whole few thousand functions of PHP core and decide if a parameter should be named or not
 
user12640521
9:18 AM
@beberlei No I'm saying let all PHP Core functions be named and all user functions have to be explicitly defined.
 
user12640521
@beberlei Although, I might have not expressed this very nicely
 
@bwoebi What was wrong? ^^
 
@JellyLegend what do you think of this patch I cooked up? github.com/php/php-src/commit/…
 
user12640521
@beberlei *"all user functions have to be explicitly defined." -> User defined functions have to explicitly define support for named parameters
 
user12640521
@beberlei I'm ashamed to say I'm not a C programmer yet. But if I understand correctly, attributes could be used to identify parameter aliases?
 
9:25 AM
@JellyLegend yeah the test is the relevant thing to look at, it would allos giving a named parameter two names, so it can be easily renamed
 
@NikiC I added the following sentence to the RFC: "It is also not completely clear whether the right hand side of the assignment should always be evaluated or not. " It's hard to give a better explanation without confusion.
@NikiC Do you think the RFC is sound in its current state? If so I'll announce the changes and open the vote tomorrow. Then we have at least a few days to merge.
 
user12640521
@beberlei I like the fact such an option will exist. But I'd prefer to never have to use it.
 
user12640521
This is my opinion:
-> use named parameters for all Core PHP functions,
-> user defined functions have to explicitly add support for named parameters, if PHP were to take after Dart a
syntax like https://gist.github.com/jellyNoone/7542810349a6be43578044b64438b69e should seem natural
 
user12640521
9:42 AM
Could you also correct me if I'm wrong but as it currently stands won't every function require a parameter check to allow for named parameters to be used? Wouldn't explicit support (in user defined functions) help with that?
 
user12640521
As I implied I am no expert, I just wanted to express my opinion. But I believe that the core PHP Team will make the right decision.
 
@IluTov " Right hand side of an assignment" bullet point probably not relevant anymore?
 
@NikiC Oh right.
 
typo "surpsises"
typo "closesly"
@IluTov Anyway, I don't see any issues with the proposal as is
 
@NikiC Great! Thanks for help Nikita! The typos are fixed.
 
user12640521
9:54 AM
@NikiC since you are the implementor of named parameters could you comment on my thinking how named parameters could work in PHP?
 
@IluTov zend_writeable_variable still allowed coalesce/chains
 
10:13 AM
> I believe that the core PHP Team will make the right decision.
@JellyLegend I like your optimism.
 
where's that at?
 
...
 
@JellyLegend Sorry for chiming in, but I think the question has already been decided. I believe there won't be any change this late in the process
 
@JellyLegend Opt-in would greatly diminish the usefulness of the feature, imho
 
@NikiC aren't you essentially saying that @@ vote is invalid when you wouldn't vote on this even anymore even with namesapce tokens? We are dancing around the issue here for a while, but someone at some point has to make the decision that @@ is invalid because of the implementation concerns. Should we ping Sara on this, not sure she is aware already of the complication
 
user12640521
10:20 AM
@MátéKocsis Just had to put it out there.
 
user12640521
@NikiC Thank you for the feedback, and good luck with the implementation
 
@JellyLegend I also think that opt-in will increase, not decrease, the long-term maintenance burden
I really don't buy the whole parameter renaming argument, simply because it does not mesh with my experience in the least. The actual burden of named arguments is a) the initial burden of reviewing argument names in existing code and b) making sure that arguments names are sensible in new code -- where the latter does not require any particular thought with regards to named args, more some general care that parameter names are as good as method names
Actually adding an opt-in would add actual named args specific maintenance overhead on top of that
Because now every library author has to think about the question of whether some particular API would be useful to use together with named args -- and different library authors are very likely going to have different opinions on this, and enforce their own style on all users of the library
Just imagine having to review PRs for "add named args support for these methods" ugh
 
user12640521
@NikiC Ok, I see your point. Maybe the renaming isn't such a valid point. But using named parameters by default might also encourage the usage of more parameters in methods?
 
cmb
I agree that default support for named arguments is a Good Thing, but especially for some extensions this may get messy, e.g. github.com/php/php-src/blob/… and github.com/krakjoe/uopz/issues/128#issue-646229842
 
@JellyLegend "oh no, we made something easier in the language, how can we stop this from happening." /s
 
10:30 AM
@JellyLegend If that is a deemed problem for your project you can fail that at code review
 
@cmb this dba API is… wow
 
When we added "goto", people didn't start using if and goto over for, foreach, do, and while either..
 
@JellyLegend Again just my 2c, but I do think that named params change the calculus on what is a "bad" method when it comes to number of params
Named params make things like boolean arguments (imho) perfectly acceptable
While right now they should be avoided at all costs
@cmb I do agree that opt-out mechanism (in both directions: positional-only and named-only) are probably a good idea
 
cmb
yes, would be nice to have :)
 
@beberlei I wouldn't vote for it, but I wouldn't block it either...
 
user12640521
10:41 AM
@NikiC Your right. From limited experience with Flutter / Dart I can say that using named parameters there is almost the only way to build something, there are 10+ parameters long constructors, because the language allows them to be assigned through the feature.
 
user12640521
@NikiC Regarding the explicit op-in this is probably just me wanting to keep us thinking about the intent behind our actions even on a level such as parameters.
 
user12640521
I think you presented points that are better than mine, and don't get me wrong I love the fact this feature is coming to PHP. I just hope it is the right implementation.
 
@JellyLegend I hope so too :) It's hard to evaluate these things in advance. We will only fully understand the tradeoff once there is widespread usage ... at which point the core model cannot be changed anymore. Chicken & egg.
 
user12640521
@NikiC Good luck :)
 
11:09 AM
Hello everyone, Currently I am integrating Razorpay using PHP. I am on testing mode right now. I want to enable international payment section on test mode but enable option is not showing on razorpay console settings. Any one know how to resolve this ?
Note : I am on Test mode
 
> If you already have a Razorpay account, contact our Support Team to enable international payments for your account.
From razorpay.com/docs/international-payments It's not unusual for some payment methods to need to be enabled after contacting support or providing more ID.
 
Okay thanks @Danack
okay got it
 
11:23 AM
yaml_emit looses decimals on floats/doubles ・ yaml ・ #79866
 
@JellyLegend for the record, my opinions on named params have gone through basically the same process as this conversation: I was initially dead set on them being opt-in, but have been convinced by the more pragmatic approach of leaving it to coding style
in particular, if a library really doesn't like the constraint of names being part of its API, they can just note in the readme that they are not included in the compatibility promise
in the same way that people use @internal doc comments for things that can't be private at the language level, but shouldn't be used outside the library
whcih is frankly a lot easier than having half a dozen different access modifiers like C# docs.microsoft.com/en-us/dotnet/csharp/language-reference/…
private protected makes my head hurt
 
12:04 PM
Anyone familiar with Phalcon, is it possible to install version 3.4.5 on php version 7.4?
 
@NikiC Would it be okay for a new RFC to propose fixing the scientific notation for PHP 8.1? Technically it's breaking BC, so maybe it's only acceptable for a major version.
 
@ArnoldDaniels I think if you argue the security angle, and mention that there is precedent for such a change (in 5.4.x iirc), it should be possible
 
Ok, I'll do that. Thnx
 
cmb
12:47 PM
Linux question: if I open() a new file (O_CREAT), don't write to it, don't close it, would it be seen by opendir()/readdir()?
 
12:57 PM
@cmb O_CREAT has immediate effect
Opening a file without immediate creation would require O_TMPFILE
 
cmb
Thanks! But why does github.com/php/php-src/blob/master/ext/session/tests/… pass? Isn't the new session file supposed to be deleted (GC probability is 100%) on session_write_close()?
 
@cmb because ordering … session is first opened, then gc applied
 
cmb
Ah, I think I understand now: "check whether its last access was more than maxlifetime ago". That would render that test brittle on all systems (not only Windows, where it fails occassionally).
 
yes
 
@cmb it's a known intermittent test
not just windows
 
1:06 PM
@KerrialBeckettNewham we're just doing that upgrade, and concluded we needed to move to Phalcon 4
 
cmb
Shouldn't we fix the test then?
 
not sure if that's a hard requirement though, or just availability of binaries
 
@cmb yes ^^
I never looked into it, just saying that I saw it fail occasionally
 
cmb
working :)
 
@KerrialBeckettNewham looks like there's been some patches to try and get it working, but it's not officially supported: github.com/phalcon/cphalcon/pull/14682
 
1:20 PM
Congratulations, folks, you have won at Stack Overflow
 
@beberlei It would be great if you could get your recording to me soon :-)
 
@Derick sorry forgot about it
will do now
 
!rfcs
 
cmb
!!
 
sudo !!
!!rfcs
 
@Derick see email
 
@Derick first sentence: already 3 "like" god I hate myself
 
@IMSoP Thanks :)
 
@IluTov I've pushed an alternative way to implement the short circuiting. What do you think?
 
@NikiC I'll check after work (in 1-2 hours) :)
 
1:54 PM
<yeet>
 
@MarkR Well which part are you talking about? Season 1 is 2 Arcs: Aincrad and Alfeim, Season 2 is also 2 other arcs: Gun Gale Online and Mother Rosario (with the Excalibur side story from the same book where the underwater dungeon from the Extra S1 recap movie (obviously pool episode)), there is then the original Ordinal Scale movie, and finally Season 3 which has it's 4th part being aired is Alicization, Alicization is actually a massive step up and doesn't have that much weirdness
Except they decided to start with that for part 4
 
I finished watching Alfeim last night, but the whole Alfeim arc seems to have gone reallllly heavy on the cliché tentacles
 
Ah yes, that one is very bad
S2 is mostly fun and not too much weirdness (still props up once IIRC?) but I think it's worth it just for Mother Rosario which is probably one of the best arcs
Maybe because it focuses on Asuna and not on Kirito lol
 
I'm honestly surprised it ended up on Netflix, Asuna is mean to be 16, 17 in that storyline and it's got several full blown sexual abuse scenes in :S
(that was more for anyone else reading wondering what we're talking about)
@Girgias Is that S2 as it appears on netflix or the original chapters?
 
@MarkR S2
I mean one of Alicization's episode literally has a content warning soooooooo
 
2:03 PM
._______.
 
but that one is satisfying for reasons
 
@NikiC ast->attr |= ZEND_SHORT_CIRCUITING_INNER; might this lead to some surprises? I think there is code out there that does ast->attr == ... instead of ast->attr & ... which would break.
 
@IluTov which is why it's limited to only short-circuiting ast kinds, rather than being blanket applied to everything
The proper way to do this would be to pass a flag down to compile_expr/var, but that ends up being a bit ugly (I think you tried that in an earlier version?)
 
2:35 PM
For an extension, is there a nice way to access superglobals or do we just read a variable that happens to be a global?
Just realized I don't know how to get a zval for the superglobals though.
 
@Girgias I posted much the same in the forums, but IMO if you're cleaning up the saner numbers we should either use it as a stepping-stone to fix the problem entirely or just backport a notice to 7.4 and fix the problem completely in 8.0
 
@MarkR I think the best way is to add a Notice in PHP 8.1
Cause backporting a notice won't happen
I would also like that PHP 9 promotes the remaining warnings to TypeErrors
 
@LeviMorrison its easy, let me find the snippet
 
@Girgias I thought I saw one in the PRs just yesterday.
 
@LeviMorrison HashTable *server = Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]);
 
2:41 PM
Thanks!
 
@MarkR No clue, I'll check but I need to update my Desktop as I just came back after 4 months lol
 
@beberlei These are available in RINIT, yes?
 
@LeviMorrison yes, but you need to trigger "auto jit" there with zend_is_auto_global_str(ZEND_STRL("_SERVER") TSRMLS_CC);
 
Hi
I would like to build a website, but I need to store a loats of high quality pictures in the server. Can someone suggest me a cheap way to do it?
 
out of curiosity, anyone know if there's a change in 7.4.8 that might have caused these segfaults in Phalcon? github.com/phalcon/cphalcon/issues/15107
from my limited understanding, it seems like either the ABI changed, or they were relying on something they shouldn't have been
 
3:00 PM
Now I'm just confused, I thought for sure I saw a PR request in the past week which targeted 7.4 and added something like "This value will change in the next version"
 
@BálintCséfalvay AWS S3 is pretty cheap; I imagine Azure and Google Cloud have similar offerings
 
Whoops (github.com/php/php-src/pull/3917) im a bit out of date
 
cmb
@MarkR that PR is just for people who want to build their own PHP for testing/preparation purposes.
 
On master when I ext_skel a new extension I get a failure like this:
error: expected identifier
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test1, 0, 0, IS_VOID, 0)
Anyone able to reproduce this? Wonder if it's a Mac thing, or a recently changed master thing.
Ah, it is my fault; I re-ordered the headers with the auto formatter and it's not permitted in that order.
 
@IMSoP github.com/php/php-src/compare/PHP-7.4.7...PHP-7.4.8 I don't see any obvious ABI breaks
 
3:12 PM
odd; re-building the .so seems to reliably clear the fault
 
cmb
3:42 PM
I can't repro the phalcon issue on Windows
 
Hello everyone! I was wondering if there are some metrics for page views on php.net? For an internal project, I'm interested in the number of page views on the MongoDB extension docs (if any...)
 
@beberlei thanks! Got it
 
@Derick loved the stream with matt, he is quite fast jumping around in his things like a bouncy ball :-)
 
@NikiC Ok cool 👍 The rest looks good to me.
 
@beberlei Yeah... he needs to slow down a little :-)
 
4:04 PM
@Girgias you don't, like, like "like"?
 
@Danack don't remind me
 
4:16 PM
Anyone familiar with an extension that needs a C dependency that doesn't match the name of the extension?
Ah, I bet one of the mongo extensions, since one is named mongo and the other mongodb.
 
@LeviMorrison mongo had no dependencies. mongodb depends on both libmongoc and libbson (both of which happen to be bundled, though).
^ by "no dependencies", i'm excluding optional deps like SASL
 
oh hai @jmikola
@LeviMorrison ext/date and "timelib" ?
but that's also bundled
 
user13638878
Hii
 
4:57 PM
Hi
While using Laravel Global Scope My booted method isnt working
protected static function booted()
    {
        static::addGlobalScope('blocked', function (Builder $builder) use ($id) {
            $builder->whereNotIn('id', [2]);
        });
    }
when I do User::all() it is not adding the whereNotIn in this query
only select * from users query firing
 
5:20 PM
please ignore use ($id) their
 
5:43 PM
I have seen weird namespace access in one of the code file-
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
Where Kernel is an interface
Can someone please tell me what is this kind of code
 
5:54 PM
@Girgias the secondary vote is a bit tricky. Usually votes are about what to changes. Now It's about what not to chamge. 😃 Btw i am wondering why it is a simple majority vote?
@Girgias the secondary vote is a bit tricky. Usually votes are about what to change. Now It's about what not to change. 😃 Btw i am wondering why it is a simple majority vote?
 
@MátéKocsis Because it's really a small detail and simple majority is fine, it's only the main proposal which needs to be 2/3, secondary votes can be 50% ^^
 
6:13 PM
hi can someone please guide me how to make symfony api for mobile application ?
 
@Atulkumar Symfony cast has a video course on creating an API in Symfony 5.
 
It's not free
 
You can then have your Mobile app front end call your api
$12 dollars
Read that book.
 
Can anyone tell my why, when calling a method from within another method, the data is not passed through and it is rendered as null?
 
6:30 PM
lets see the code
Create a gist and paste the link here.
 
This is the link to the SO post. Figured you are all PHP specific stackoverflow.com/questions/62939266/…
Which is why I am asking here
 
thats easy
you need to pass the instance of the class into the function.
 
 
1 hour later…
8:00 PM
@beberlei I assume I should expect it to return true?
 
@LeviMorrison i only call it, nothing with the return value
 
8:18 PM
Do all SAPIs have this thing or do I need to guard it?
 
@LeviMorrison no clue :)
 
8:32 PM
Incorrect constructor promotion ・ *General Issues ・ #79867
 
Is SPL currently an extension or no?
 
@Crell It's an extension, but one that cannot be disabled
 
Fun. So would that belong in \Ext or \PHP do you think?
I'm thinking Ext..
 
8:51 PM
I would put it in PHP if you really made me choose between the two because it's the Standard PHP Library.
 
But why would some extensions get \PHP and others \Ext?
 
It's not really an extension. It's part of the language you cannot remove. I'm not sure how many other "extensions" are not disable-able.
 
@Crell I would put it in Ext
 
I think putting things in Ext is weird. Whatever namespace is chosen, it should be valid whether it is in core or punted to pecl.
 
I mean, the hash and date extensions also cannot be disabled, but I wouldn't consider them core PHP functionality
 
8:54 PM
That would mean Ext
 
Arbitrarily adding Ext to the name doesn't do anything for me.
I'd put the SPL in... SPL.
 
SPL is a bit of a special case because it does contain some core things, like autoloading ... but those really shouldn't be in SPL in the first place
@LeviMorrison Disclaimer: For me neither. I'd just use the Date, Hash and SPL namespaces :)
 
I'd put MongoDB in... MongoDB.
 
@LeviMorrison yup
 
For the record, I despise the Wiki's pseudo-markup syntax.
OK, revised namespace RFC text. cc @MarkR: wiki.php.net/rfc/php_namespace_policy
 
9:00 PM
you're not the first one and won't be the last one :-P
 
@Crell Worst case use MD and then use pandoc to convert to DokuWiki
 
9:13 PM
@Crell Looks good, only thing i'm a bit iffy about is point 4.
IMO plurals have a place. Not a hill to die on but personally I'm not sure it's necessary
 
Possibly, but consistency and lack of future bikeshedding has even more of a place.
 
e.g. \PHP\Tokenizer makes sense as it has one job, as would \PHP\Collections because they have many distinct jobs, even if they're part of one overarching intent.
Other people's opinions? Chime in.
 
@Crell @MarkR Definite -1 on singular, especially for the example given in the RFC
Namespaces are a "belongs to" relationship, not an "is a" relationship
 
But it "belongs to" a thing, not to many things.
 
It belongs to Php\Attributes, not Php\Attribute
Eh, I don't feel like arguing about this right now :P
 
9:21 PM
Better now than during voting. :-)
(It's not a hill I feel like dying on, either; I just figured it was good to avoid future debates.)
 
@Crell Belongs to a feature, that feature being attributes (plural) because only having one of them wouldn't be a very useful feature.
 
OK, that line is gone.
 
I think it's probably as good as it's going to be. IMHO it offers a solution to the root problem and provides reasonable guidance to allow RFC authors to move forward with a bit more confidence.
The root problem... hey I made a pun by accident \o/
 
rimshot
 
9:43 PM
Should I resubscribe to Disney+ so I can rewatch a bunch of Disney movies?
For a month
 
If you have Verizon you can get it for free.
 
6.99 versus ~3.99 * n (where n is the number of movies I rent off Amazon)
@SalOrozco narp. Verizon doesn't even have coverage where I'm at, and I use a local telecom because they offer fiber.
 
You rent new or older movies?
I have prime.
 
I tried 3 times to get a hold of my ISP today... they tell you they'll only speak to people who go through their website or are at-risk.... so you go to their website, they g ive you a number, then it just plays the same message
 
@MarkR wtf
 
9:52 PM
when you put code in files named according to their md5 hashes and after 10+ years it's the first time you get a md5 collision and the wrong code is executed
 
Seriously? Wow. That's what... 1 in a trillion trillion trillion?
 
@MarkR yes.
 
Do you play the lottery? :P
 
@MarkR no
but I won it apparently
 
ISP's are just as bad out here.
For any change in your account, you have to call.
 
10:16 PM
When I do eventually get through it'll be 5 rounds of "Send an engineer to your house" and each time I will reply "How is an engineer going to solve anything when the problem is always fixed by resetting the router?"
 
They have a wifi fee here.
I guess for renting the router.
The advertisement will be $80 a month for internet/ cable service. After fees and taxes actually like 130.
At that point, you feel like you have financed a car.
lol
 
I'm in the process of trying to wire my house for full Cat6 ethernet, easier said than done considering it's 30 years old and there's little to no cable routing opportunities from the attic
 
Fun project.
or maybe challenging.
 
Well I spent 2 weeks trying to sneak a cable down the side of a waste pipe which is the only direct route from the attic to the ground floor
I finally managed it today so I can at least add another router downstairs
 
10:40 PM
That's progress.
 

« first day (3561 days earlier)      last day (1387 days later) »