« first day (3656 days earlier)      last day (1285 days later) » 
00:00 - 22:0022:00 - 00:00

12:33 AM
@Jeeves I have produced MCVE but I still have no idea where the problem comes from. pastebin.com/sCbzpQ5D
In some magical way OPcache repeats loop ID:7
Why is bugs.php.net/vote.php giving me 500? Am I supposed to be logged in?
 
 
2 hours later…
2:21 AM
C++20 has heterogeneous lookups for associative containers like unordered_map and unordered_set. This seems pretty performance critical for things like string, because if you have to make a string object from a string-like then it's potentially expensive because the string's constructor will allocate, just to throw it away after lookup.
Or I guess "will have", technically.
 
2:38 AM
Anyone ever mounted a secondary partition/drive encrypted with bitlocker?
 
@JoeWatkins It appears to be indicating that anytime I access the fiber globals (FIBER_G, so e.g. FIBER_G(current_fiber)) that the pointer is uninitialized. That is absolutely not correct, or everything would fall apart. Any idea why it would say that?
Appears to happen only after switching contexts.
 
3:14 AM
@JoeWatkins Hah, now that I look at fiber_stack.c (which I haven't touched since porting this from code that Martin Schroder wrote), you need to compile with ZEND_FIBER_VALGRIND set. This registers a valgrind stack when creating contexts. Takes care of all the issues valgrind was reporting about uninitialized values.
 
 
2 hours later…
5:30 AM
@Trowski ah
 
@JoeWatkins Looks like I may have a few issues when destroying an unfinished fiber. I’m not sure I did that correctly, I copied most of the code from destroying unfinished generators.
 
yeah, I just ran again and still got some leaks
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Nested schedulers 2 [tests/017-nested-schedulers-2.phpt]
Nested schedulers 3 [tests/018-nested-schedulers-3.phpt]
=====================================================================

=====================================================================
LEAKED TEST SUMMARY
---------------------------------------------------------------------
 
@JoeWatkins Yep, those test have unfinished fibers. Any help would be appreciated.
 
5:46 AM
school run, but I'll give it a look when I get back ... I'm very unfamiliar with this code and don't know that I'll be helpful
 
@JoeWatkins I’m off to bed. Hopefully your expertise in internals will shed some light on where I went wrong cleaning up the unfinished execution context. Thanks!
 
6:44 AM
@Trowski I've had a quick look at zend_fiber_dtor_unfinished, the refcounting of fiber->std doesn't make sense, but the main problem seems to be that the global frame EG(ced) is never set and you enter zend_throw_error which relies on that ?
if I get some more time today I'll dig more
school run 2, then supermarket
 
7:43 AM
@RemiCollet Is there a reason why your PHP builds do not have Argon2 support?
 
7:53 AM
@bwoebi Any thoughts on github.com/php/php-src/pull/6344? ^^
 
@SebastianBergmannbecause this have no value
install php-sodium and you will have the additional password hash, and much faster than argon2 implementation.
 
Also, just don't use argon2 unless you are already locked in...
 
At some point, perhaps we should even drop this implementation from php-src
 
@RemiCollet Ah, so ext/sodium also provides PASSWORD_ARGON2ID for password_hash() etc.?
 
@SebastianBergmann since 7.4 or so, yes
 
8:01 AM
@NikiC Thanks!
 
@SebastianBergmann yes, and there is a weak dep, so when you install php, you should also have sodium ext (Fedora and EL-8)
@SebastianBergmann there is a pinned issue about this, and see the comment about perf: github.com/remicollet/remirepo/issues/…
 
@RemiCollet Thanks!
 
 
2 hours later…
10:31 AM
morns
 
10:53 AM
@NikiC haven't gotten to review it yet, but will do today
 
11:16 AM
file_get_contents strip first line ・ *General Issues ・ #80256
 
12:10 PM
Morning!
 
o/
 
12:27 PM
\o
 
o/
 
cmb
12:42 PM
 
1:05 PM
variable in the prepared statement not refreshed when multiple call ・ MySQLi related ・ #80257
 
Hi there. I can build the PHP source and I have a bit of C background, but I've never worked with php-src. How could I help to move this feature forward? bugs.php.net/bug.php?id=71832
 
Windows Deduplication Enabled, seeing randon permission errors ・ SQLite related ・ #80258
 
OP uses the wrong tool for the job (IMO) :-)
 
1:29 PM
@Jeeves It's not a bug, it's mysqli
It would really be nice to have bind-in-execute in such cases. Binding by reference causes confusing situations like this.
How do I register to be able to reply and vote on bugs.php.net
 
1:51 PM
@Dharman You don't have to register to do those things.
 
I can't vote because I get error 500. To comment I always need to do maths and give email.
 
cmb
according to bugs.php.net/bug.php?id=79910, voting is broken
 
2:06 PM
I'm having a hard time finding all places that EG(vm_interrupt) is checked. It's done through macros in macros. One of them is ZEND_VM_SET_OPCODE, which is done in DO_FCALL, DO_ICALL, and DO_FCALL_BY_NAME. IIRC it's also supposed to get called on back edges of loops, but I can't find what actually does this.
 
@LeviMorrison ZEND_VM_JMP
 
@Crell Yo
 
@NikiC Thanks!
 
@Crell reads other notification Oh. Yeah.... s/r conflicts are funs.
The source of that conflict doesn't seem obvious, but I'd have to spend a bit more time with the grammar...
 
2:28 PM
@Crell Ah. Did you, by chance, only replace inner_statement with expr and not add the terminating ';' ?
 
Ah, I did.
 
e.g. You want: | T_DOUBLE_ARROW expr ';' { $$ = zend_ast_create(ZEND_AST_RETURN, $2); }
 
What about backup_fn_flags?
(I have no idea what that is.)
 
Sec... I've only looked at the second case so far :)
 
:-)
Adding the semicolon fixes it for functions, though, and now gives a proper parse error. Yay.
Now to do the same for methods.
 
2:32 PM
Yeah, was gonna ask. What does "what about backup_fn_flags" mean? If you asked a question, I missed it.
 
I had not asked. I just copied it from the previous line and assumed it did something important.
 
There's some look-aside information the lexer stores while creating functions and the zend_ast_create_decl() picks back up. Don't worry about it too much.
 
I will happily ignore it for now then.
 
Regarding the need to add the terminating semicolon but not needing it for inner_statement. inner_statement includes all statement definitions, one statement definition is expr ';' so you were previously getting the pattern you actually wanted, you just got a bunch of other patterns as well (like T_FOREACH ... for example)
Technically, if you WANT to support statements as well, you could, you just need to have a backup expression to drop into the AST (or allow AST_RETURN to deal with a NULL expr by returning PHP NULL). Probably not worth adding that support.
 
Nah, I just want single expressions here.
 
2:37 PM
huh... zend_compile_return() does deal with NULL. I wonder where your crash is coming in....
 
Is the .y file supposed to use spaces or tabs?
 
Yes.
 
@MarcelHernandez I would recommend i) creating a repo on github that lists what you're trying to do, and so you can point people to a single place to track progress, ask questions etc. ii) Look at some other extensions that have persistent connections and document how those work, at least to the extent that you could plan the work required.
 
Good, then the fact that it seems to be inconsistent won't bother me. :-)
 
Primarily tabs, but spaces for alignment are common.
 
2:40 PM
iii) Plan out what work needs to be done from that, and ask for more specific help. People are willing to help, but also people don't really want to commit to spending a huge amount of time on something.
 
Just pushed code again with the expr change. All tests were passing for me locally, at least.
 
\o/
 
I've been thinking about how to make it easier for people to ask for help on internals stuff. If you create a markdown file of the above in a repo somewhere, that would be some motivation for me to do....a thing.
 
@Sara When is it polite to start submitting 8.1 RFCs?
 
Now
 
2:44 PM
yesterday
 
Technically, from a couple months before feature freeze.
There's no reason to NOT discuss, or even vote on new features.
It's merging shit that has limits.
 
Right then. I'll post the RFC once I confirm the tests still pass and hope for the best. nervous shaking
 
Good luck.
 
@Crell maybe link it for more 'proof-reading'?
 
I'm tepid on it personally, but I see the use.
 
2:45 PM
@Danack Parse error: syntax error, unexpected token "foreach" in /home/crell/Projects/php-src/Zend/tests/short_functions/short-method-no-statement.php on line 7
Bah, Wrong paste.
 
Mostly I like it for accessors.
public function getFoo(): int => $this->foo;
 
Right. Though if you're doing functional stuff, named short-functions become even nicer.
 
I think users might get surprised by this being a compile error though:
`public function setFoo(int $foo): void => $this->foo = $foo;
Even making it null will result in runtime errors.
 
function ret(mixed $a, mixed $ret) {
return $ret;
}

public function setFoo(int $foo) => ret($this->foo = $foo, null);

I don't know that it's a good idea, but amazingly it does work. :-)
 
That's an awful idea.
 
2:49 PM
I'm totally fine with single-statement-does-nothing short functions if others are; I'm just not entirely sure how to do it.
 
`public function setFoo(int $foo): void { $this->foo = $foo; }`
^^Better idea. :)
Basically, we have a way to do statements already. :)
 
Also OK by me.
Honestly, my interest is more in combination with pipe.

function doThing($a) => $a |> foo(?) |> bar(?) |> baz(?) |> beep(?);

Or doing reductions, or a simple match statement, or other functional things.
 
@Crell I think that could be polished to be more persuasive. In particular, those words don't make it clear what the problem is that would be solved. Which means people who are instinctively against new stuff, will start reading it, get annoyed by seeing new stuff, and reject it as an idea before actually contemplating it.
 
What sort of additional persuasion do you think would be effective?
I can show some getter methods, or some functions that are just wrapping array_map(), array_reduce(), etc.
 
Showing the problem first. e.g. the match function with block functions.
which would probably be unreadable.....
 
2:57 PM
Not unreadable, just considerably more clunky.
 
3:08 PM
@crell It should be clearer what is being proposed, not just demonstrated by example. So instead of "Specifically, the first function below is semantically identical to the second:" something like "allow declarations of functions without enclosing braces, where there is an implicit return for the last statement.". Or whatever it is actually proposing.
I do think that needs polish, but my brain is not working great today. Can you chuck it onto github as MD so it's easier to suggest changes?
 
@Sara Also, style linters need to allow this. Drives me nuts how much space "small" things take in traditional style checkers for PHP. clang-format is much nicer.
 
PSR-2 BABY
;p
Our (MDB's) use of clang-format, for reasons which escape me, are configured to allow the pattern:

if (cond)
    thing();
Which driving me nucking futs.
JUST PUT SOME GOD DAMN BRACES ON THAT SHIT
 
3:26 PM
Or force it to be single-line.
 
something something..... all the single statements, all the single statements, all the single statements .....something something.... should have put some braces on it .
4
 
@Sara eh, it's fine
I've come to understand that the only really objectively bad coding style choice is to use alignment for function arguments/parameters. Even using tabs instead of spaces is not so bad, considering ;)
 
@NikiC That one requires a formatting tool, definitely.
 
@Danack Unfortunately that requires manually converting Docuwiki to MD. Because our wiki sucks. :-(
 
Things like if (cond) return; and if (cond) continue; and such are fine by me, definitely. Why take up 2 or 3 lines for it?
 
3:30 PM
if (cond) { return; } but that one I'm willing to flex on a little more.
 
But like, how many CVEs have come up because somebody didn't brace on a thing that turned out to be a multi-statement macro.
And yes, multi-statement macros should follow the do { statements; } while (0) pattern, but belts-and-suspenders, man...
 
 
2 hours later…
5:21 PM
@JoeWatkins Ah yes, I see. I'm not sure that's a problem as the fiber passed was always the currently executing fiber (so EG(current_execute_data) == fiber->exec). I removed the param since it was misleading.
I'm not sure about throwing the exception. The generator code doesn't do that, but it also appears to assume there was an exception already being thrown, so… I guess that's correct? It works as I intend, only executing finally blocks.
Looks like there's some use-after-free errors from valgrind though, so perhaps I need to shift some things around?
 
5:33 PM
> www.valgrind.org’s server IP address could not be found.
oh_no.jpg
@Trowski fyi, it's possible to run valgrind as a GDB server, which would allow you to step through that bit of code, which might be easier than just shifting things around. Section 3.2 in web.archive.org/web/20200819033253/https://www.valgrind.org/…
or not, depending on how valgrind +gdb plays with fibres.
 
5:49 PM
We have repeatedly some critcal errors on our nvme ssds on prod, in a software raid 1 … but always on the second disk of the raid 1, never on the first (well, apart from a few legit old-age issues). Also only happens when a manual fstrim is triggered. Despite lots of research I'm at an absolute loss where to continue debugging. Does anyone know somebody who I can ask for further assistance?
 
@bwoebi other than server fault, contact the manufacturer in a public place like twitter?
 
Hi guys. I am facing a serious issue. I have no clue what is happening. Can someone guide me to solve this problem?
 
> Don't ask to ask, just ask.
 
@Danack Can I ask to ask, please?
 
I have a form through which a user enters data. The data is grabbed by a script and it is submitted to the database. This works very well on my machine but when use it on other machines its showing an "undefined index" error. I went through stackoverflow and used the isset method to find whether it is set or not. Its showing its not set. I checked if I checked any spelling errors or what! There was nothing! How can I solve it
 
6:00 PM
@DaveRandom I don't know can you?
 
May I ask?
@Danack apparently so ^
 
What more of information is required?
 
My money is on both server throwing the exact same error
 
I suspect it doesn't actually "work well on your machine", it's simply that you have display_errors disabled on your machine
^^ what he said
 
And you just haven't set up displaying of error on the one machine that "works"
^^ what he said
 
6:02 PM
I'm sure we used to have a good canonical for this
 
No. I mean the data is entered into database and I can display them
 
@RifkyNiyas I don't know, you will need to find out by doing debugging. there is a tutorial on using xdebug here youtube.com/watch?v=LUTolQw8K9A
 
There was a thing I did IIRC
 
I have used try and catch blocks
 
I think he's just down :P
 
6:04 PM
 
@Danack It does not only affect nvmes from a single manufacturer … so probably not a firmware issue … I guess?
 
@RifkyNiyas first things first, you need to look at the error messages and go to the file/line that they reference
show us one error (in it's entirety) and the code on that line
 
@RifkyNiyas people won't be able to guess what is wrong. You'll need to find out what is wrong by stepping through your code, and then it might be able to help you. But probably it will be obvious how to fix it, once you know what the problem is.
@bwoebi maybe. But if you tell them, with an insinuation that their stuff doesn't work....they have an incentive to help you figure out what is wrong.
@DaveRandom I bet one beer, that it's a typo on a field vs array key.
 
@Danack Ok I understand. I went through my code several times and Ill check it once again. Else can I'll be back here
 
@Danack I bet 10 beers that you are correct but that is not the only problem.
 
6:09 PM
!!debugging
 
I knew it was a thing
 
@PeeHaa did you manage to retrieve the old data files from og Jeeves?
 
Nope
 
:-/
 
6:11 PM
 
all the aliases and plugin data was there, so the majority of stuff like that ^^ won't work
 
I know :)
I call it the great spring cleaning :P
 
"great"
 
Why dont you use emojis
 
also I'll table s/spring/surprise/
 
6:12 PM
!!canon
 
@RifkyNiyas because I am over 30
 
hmmmm
@RifkyNiyas Because it is generally a terrible form of communication
 
30 years old? What does it have to do with emojis sir?
 
right, I'm going to my mate's house which is in an area where I once had a firework rocket launched directly at me from about 8ft away by a 9 year old
 
@PeeHaa 😂😂. i really find it difficult to understand what these symbols mean
 
6:14 PM
it was nice knowing y'all
:-P
 
👍👍
 
I have a non-technical question, as a product owner (manager), how do you sort (order) the backlog? I mean, based on which parameters do you specify tasks/stories priorities?
I know it's a general question, but I appreciate if you share any comment you have on this
 
I have two main camps: good for business and good for engineering. Within those there are priorities too, but I try to make sure I'm doing a bit of business and a bit of engineering each sprint/quarter/whatever.
 
I see .. great vision .. thanks
 
What do you mean manager?
 
6:29 PM
emm, not sure what you mean by that question, but I'm talking about PO-role
 
Yes, but PO is a part of the product team, I don't understand what "manager" means there, I would then assume you're managing POs.
 
oh .. I meant, in some companies PO orders the backlog (for a new Sprint), and in some companies else the PM does that
 
Got it. Parameters for me are business value e.g. something that will increase sales (or whatever is the KPI) and the effort/investment estimate (basically complexity i.e. is it "low hanging fruit").
@LeviMorrison good for business means it will be good for engineering budget wise :)
 
ah I see
 
6:59 PM
@Danack Any idea if it can work with lldb?
 
7:18 PM
guys after I revised a code a million times, still I see no way out
Its showing the error :undefined index sellVehicleType in....... on line 68
Heres my html code
<div class="form-group hidden" id="rent_vehicle">

<label for="vehicleType" class="col-12">Select vehicle type</label>
<select class="form-control col-12" id="rentVehicleType" name="rentVehicleType" >
<option value="" selected disabled>Select vehicle type</option>
<option>Bike</option>
<option>ThreeWheel</option>
<option>Van</option>
<option>Car</option>
<option>Lorry</option>
<option>MiniLorry</option>
<option>Bus</option>
<option>Other</option>
</select> </div>
And in PHP..
$sellVehicleType=$_POST['sellVehicleType'];
echo $sellVehicleType;
And thats the error. What could be the problem??
 
Have you tried using a debugger?
That will help you locate the problem
 
This is working fine on my machine. I changed the code to echo out instead of sending this to database. Still it shows the name as Van when I submit it. It shows the error on all the other machines except mine
@Tiffany Is there any on visual studio code?
 
If a debugger isn't possible, then some well-placed var_dumps
 
var_dump here?
 
@RifkyNiyas might be some integration with Xdebug.
@RifkyNiyas in your code
 
7:26 PM
I am using AMPPS and in the other computer there is WAMP installed. Could this be any cause for errors like this?
My million dollar confusion is how is this working perfect on machine and why this just never works on any other?
 
@RifkyNiyas Your shared HTML doesn't even match with your php code
 
oh sorry wait.
<div class="form-group hidden" id="sell_vehicle">
                            <!--For selling vehicles-->
                            <label for="vehicleType" class="col-12">Select vehicle type</label>
                                <select class="form-control col-12" id="sellVehicleType" name="sellVehicleType" >
                                    <option value="" selected disabled>Select vehicle type</option>
                                    <option>Bike</option>
                                    <option>ThreeWheel</option>
 
7:46 PM
I'm pretty sure I know the answer to this but is there documentation on PHP-FPM's internals?
 
@LeviMorrison lol
 
Right, right :)
Do any of the SAPIs have extension points or hooks or anything? For instance, is there a way to know how many "workers" there are in either a SAPI agnostic or specific way?
 
I am using the Xdebug and now this error pops up early.Exception has occurred.
Notice: Undefined index: ProductName
The html for that is
<div class="form-group">
<label for="ProductName">Product Title</label>
<input name="ProductName" type="text" class="form-control" id="name" placeholder="Samsung mobile phone" required>
</div>
PHP part..
$ProductName=$_POST['ProductName'];
Ok then can anyone suggest me a better way to get data form a form in PHP
 
8:06 PM
Getter methods, a match function, what are other examples of syntax now that would be nicer with short-functions? Pipe chains are the other one I have in mind but I don't know if it's safe to mention that here.
 
8:21 PM
@Danack wiki.php.net/rfc/short-functions - Added some further explanation and examples.
 
8:47 PM
@NikiC How often have you seen a segmentation fault in this? github.com/nikic/sample_prof/blob/master/sample_prof.c
 
How do you type hint DI container objects without using docblocs all the time?
@Crell I don't like that RFC. What is the benefit of this?
 
More compact, pure-function-encouraging syntax.
 
Why wrap single line expressions in a function?
 
That happens all the time?
 
I never liked that. For me a function should have a purpose
 
9:01 PM
Putting a label on some complex expression. Getter methods. In the future pipes. I have tons of functions that are a single expression.
 
I can understand getters
Use comments
 
Single expression functions can easily have a purpose.
 
I have a lazy Linux question and I can't figure out the right keywords to google. Is there an option for find that only captures files that have contents? Not anything specific, I'm just trying to exclude files that are 0 bits.
Maybe that's what I can google
 
if ($this->isAdmin() || ($this->hasPermission('foo') && $this->hasPermission('bar')) ) {
}
 
So, effectively you are just providing a label to your single line expression
 
9:03 PM
It's quite common to recommend pushing that if check to a separate function so you can name it. It's one of the more common refactoring/self-documenting techniques.
All functions are just expressions. Otherwise they're just subroutines. :-)
 
Can you maybe come up with better examples for the RFC. function add(int $in): int => $in + $this->val just feels like going back to COBOL because letters are better than signs
 
Well, most examples of reduce are contrived if you're not in a strictly functional language. :-)
 
@Tiffany -size option, more specifically -size +1
 
Given that 90% of PHP community uses PHP in a procedural way, I don't see how this little syntactic sugar will help
 
Most of it is OOP these days.
 
9:09 PM
Is WordPress OOP now?
 
Parts of it are. Also, I wouldn't consider WP core part of the PHP community. But that's another matter. :-)
 
It makes up for the majority use.
 
Majority of use and majority of writers are two very different things.
 
Besides amateur developers don't start with OOP.
 
I'd prefer to start them with functional. ;-) (I'm trying to push that direction, hence the book and other such things.)
I need to head off for a while.
 
9:12 PM
I also feel like we already have short functions. function add(int $in): int => $in + $this->val; can be written as `function add(int $in): int { return $in + $this->val;}
At least it is easier to spot the visual distinction between the definition and the logic.
Also, to make it easier on the eyes. I would add new lines... oops I am back where we started
 
@Dharman And I don't see why we shouldn't work towards supporting other paradigms
 
You see, short closures are useful because they are part of the expression. You don't want to bloat your expression with a function definition syntax if it's only ever going to be used on that one line. With named functions the function definition is not part of the executed expression. The definition sits in a separate place in your code than where it is executed.
e.g. usort($arr, fn($a, $b) => $b[0] <=> $a[0];).
I need short closure in this case, because I really do not care that I am defining a function. I don't want to see the function syntax.
When I am a definition method, I know I am defining a function that I will reuse. Therefore it is very important to me to clearly see where it starts and ends.
 
9:31 PM
Was it explained anywhere why did we enable error reporting in PDO by default but not in mysqli?
 
@Tiffany Shouldn't it be -size +0 like greater than 0? Or ! -size 0 would work too.
 
I came across this as a solution to respond first then continue processing, are they any downsides to it.?

try {
return response("", 200);
} finally {
// Controller logic here
}
never thought about using a try-catch in that way
 
Bad handling of RFC 2047 in case of folding white space ・ *General Issues ・ #80259
 
@BobbyAxe The function doesn't actually return until the finally block completes.
 
ha!!
@Trowski thank you for clearing me on that almost went on with a misinformation
 
9:45 PM
@Dharman Because PDO has nothing to do with mysqli
 
Yeah, but mysqli needs it as bad as PDO
 
In the same sense as why it hasn't been enabled in PGSQL, OCI8, SQLite or any other DB driver
 
or even more
 
Then you should have proposed an RFC
We don't think of all edge cases
 
headed over to correct the poster but my upvote is locked already guess I leave a comment for future readers.
 
9:46 PM
Especially as this was proposed from someone kinda randomly, who I imagine only uses PDO
 
@Dharman usort($arr, fn($a, $b) => a.compareTo(b)); :P
 
@DejanMarjanović usort($arr, getCompareToClosure())
 
@Dharman usort($arr, Comparator::compareTo()) 💵
 
Globals? No, use container. usort($arr, $this->container->getService('Comparator')->compareTo());
Patrick, we did it, we saved OOP
 
$this->__destruct();
 
9:56 PM
Hol up, hol up...
```
#[Autowired]
protected Comparator $comparator;
```
 
Just import it using Composer...
 
Aug 28 '14 at 10:47, by DaveRandom
Stupid chat oneboxing
 
As long as you boostrap yoself everything will be fine anyway
@Dharman composer require composer/composer
 
I think that needs PHP 8 update :D
 
00:00 - 22:0022:00 - 00:00

« first day (3656 days earlier)      last day (1285 days later) »