« first day (4434 days earlier)      last day (497 days later) » 

4:38 AM
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
4
 
 
3 hours later…
7:47 AM
morning all
Can I read using fscanf or sscanf a string containing number with more than one numeric char, for eg "move 19 from ..." ?
I tried fscanf(STDIN, "move %d from ...", $c) but it gives me only "1"
I asked OpanAI but it gives false example
I mean ChatGPT gives
Read "19" from "move 19 from..." using sscanf  function in PHP

sscanf("move 19 from", "%d", $num);
echo $num; // Outputs 19
but this evaluates to nothing
fscanf(STDIN, '%s %d %s %d %s %d', $_, $howMany, $_, $from, $_, $to); // problem solved
 
8:28 AM
@brzuchal the correct solution would be sscanf("move 19 from", "move %d from", $num);
 
@Sjon thanks now it works
 
9:02 AM
@Sjon now it reads the last line with "\n" giving me the same value instead of error
using fscanf instead
any idea? gow to skip the last empty new line?
ok removed from input
but it is strange that it runs and returns the same numbers from empty line :/
 
9:20 AM
if your input contains a newline you should add that to the template as well
 
JRL
oh god... i was not emotionally prepared to encounter this song in the wild randomly...
 
@brzuchal can you provide a bit more complete snippet? fscanf and sscanf should function exactly the same
 
@Sjon Sure, I'll try to create it using 3v4l
 
9:35 AM
Hi there! I have a question regarding the expected behaviour for the Iterator interface. If $iterator->valid() returns false, should the user expect a "successful" call (i.e. no exceptions/errors) to either key(), current(), or next(), or is the behaviour of those methods undefined if valid() returns false?
 
@alcaeus the meaning is implementation specified.
per foreach it is that if not valid() after rewind() or next(), no {key(), current()} will be called.
 
Yeah, I get that. Reason I'm asking is because if users expect to call key after moving the iterator to an invalid position, I'd have to add null to the return type for key, which I'd rather avoid.
 
@brzuchal it says in the manual * Each call to fscanf() reads one line from the file. *
and your input contains 2 lines so the loop runs twice
 
@Sjon yes, but there are two lines in stream there is double "\n\n"
but fscanf also shifts pointer
so it should not give / succeed with empty line I assume
 
so if fscanf doesn't match it doesn't unset the vars set in the previous iteration, you could do: 3v4l.org/BREbJ
 
10:14 AM
I'm using https://github.com/phpbrew/phpbrew extensively for managing my PHP versions (I often have to switch versions or enable/disable a peculiar extension) and I'm avoiding docker as much as possible for PHP/node since it's so slow.

I however find little people that do, so for folks here that do not use Docker, how do you manage your PHP binaries?
 
@RemiCollet so PHPBrew-like but native to Fedora if I understand correctly?
 
I don't know phpbrew, so can't say if exactly the same. (and RPM specific, so not only Fedora, but also RHEL, CentOS, Alma, Rocky and some others)
 
10:32 AM
@Théo I use github.com/shivammathur/homebrew-php combined with a small script to choose a version: github.com/alcaeus/dotfiles/blob/main/home/…
 
hello
 
@alcaeus normally users do foreach, itertor_to_array or [...$iter], so this is automatically compatible. just let it return TypeError throw.
 
@alcaeus how do you manage your extensions from there?
 
10:50 AM
@Théo I only use a single one and I compile that myself after making changes on it ;)
 
 
2 hours later…
12:47 PM
@Sjon Yes, or get rid of assignments and use array from the output 3v4l.org/b1PIu check for empty and avoid mistakes
 
My opcache knowledge is letting me down, can opcache with cli enabled cache compilations between multiple independent processes?
 
not on linux - not sure about windows
 
@Derick Ta very much
I'm looking for a way to improve CPU performance for a task scheduler which currently invokes a separate process per task. Unfortunately I can't pass them through a single process as there's a ton of global state
 
1:08 PM
@SergeyPanteleev is 8.2.0 your ? or Pierrick ?
 
@cmb @RemiCollet @Sara @Derick Hey everyone, apparently, PHP 8.0 has entered its final phase, Security releases only. During release weeks, do we need to do anything when there are no security patches to port to PHP 8.0? Also, do we need to update and announce anything related to this last phase? If there are docs/checklists, please, shot my way, I'll take care of it today
Thank you
 
@GabrielCaruso yes the branch should be closed and announced
this mean no more RC, and only GA version for security fixes
as security fixes will be commited in PHP-8.0 branch (the lower one), only check + release process
/me goes for a nap
 
@RemiCollet Thank you, I'll check those items today. I was reading github.com/php/php-src/blob/master/docs/release-process.md and couldn't find anything, I might also take the change to document my doings
 
Morning
 
@GabrielCaruso Not besides closing the branch — and keeping aneye out on security@ emails
 
1:19 PM
@Derick Super, thank you! I saw that Sara had not announced the latest version due to personal stuff, I'll handle that as well
 
@Derick are you sure, what would opcache.enable_cli + opcache.file_cache result in then?
 
... just the file cache?
FWIW, I had forgotten about the file cache
 
pretty sure it enables cross-process opcache precomplie sharing @MarkR
 
@Sjon Ahhh good call. I'll investigate that. I'm eating CPU spawning almost 400 processes, each compiling a bunch of bootstrap code each time, only to run about 20 lines
 
cmb
1:53 PM
@GabrielCaruso The branch is already closed (except for RMs); @Sara said she would announce that, but that might not have happend.
@Derick On Windows, SHM is shared by default for same SAPI/version. opcache.cache_id can be used to prevent that.
 
@cmb ack, tks
 
@cmb Yes, that's what I thought I had remembered, but didn't want to confirm as I wasn't sure.
 
cmb
2:12 PM
The reason is that there is no FPM on Windows. :(
 
3:01 PM
@RemiCollet Oh sorry, just see your message, it's my
 
@SergeyPanteleev yes, I saw the tag ;)
 
3:19 PM
@LeviMorrison I can't find your observer test extension... can you help?
Ah... it was Sammy's
 
4:14 PM
\o
 
I wonder what this was/is about... derickr-xdebug-fucked/... :-)
 
4:50 PM
@cmb You seem to be the only one who touches this site, so pinging you for review: github.com/php/web-pecl/pull/88. Thanks for all you do.
 
5:23 PM
Has anyone worked with SwiftMailer in Laravel 8.x and experienced this error: fwrite(): Send of 6 bytes failed with errno=104 Connection reset by peer? From this, I cannot identify if this is a credential issue or something totally different
 
 
1 hour later…
6:27 PM
morns
 
 
5 hours later…
11:09 PM
random question.........does anyone use constants in their code currently? Particularly, in a way that isn't going to be replaced by an enum.
 
For magic numbers yeah
 
that ^
 
@cmb could you add macintoshplus to the PHP org, so that I can add him to the doc-fr team
 
Things like max retry attempts ?
or more magic? like 0x5F3759DF
 
both :)
Just checked the current project and it's 99% the first case
 
11:15 PM
anyone know if there is a configure flag to not install the man page for PHP.....I'm trying to get my compile time down to under a minute, and they take about 4 seconds to install.
 
11:28 PM
@Danack yes quite a bit
 
@Théo what do you use them for?
 
for any "static" value, allows to give better visibility, makes it a bit faster to find as you open the class and see some "static config" that you can tweak or simply allows to convey the intent by providing a better name
 
Sorry, I should have been clearer in that I mean global constants (e.g. define("FOO", "something"); ) rather than class constants.
 
double checked, yes just to declare a few environment variable names: github.com/box-project/box/blob/…
 
ta.
 
11:37 PM
@Danack 2
Although they should probably be namespaced consts instead
 

« first day (4434 days earlier)      last day (497 days later) »