« first day (3433 days earlier)      last day (1737 days later) » 
00:00 - 17:0017:00 - 00:00

00:39
@MátéKocsis nope, working on an extension
Did it for good measure but still the same
awakens
Why do I have to be up at this time? =\
youtube.com/watch?v=iDMxyeNxBWo When I wake up for work.
Hahaha.
Well, I definitely don't need to be up for work yet. It's almost 2 AM.
00:59
I'm also getting memory exaustion for no good reason too
Gosh I hate this whole API
Oh i figured out the memory exhaustion
If the iterator is bonker (i.e. something is out of sync between next and isValid) it dies
Not sure that should happen tho
Oh god Mike with the massive bikeshedding again
 
6 hours later…
06:58
@Ocramius that was fast.
Good morning.
Guess who's colleague had fever yesterday after he went to Rome two weeks ago \o/
07:16
@BogdanUngureanu Quarantine time!
Yeah, don't leave the office for the next two weeks :D
07:58
Work from home
Haha, it's called working in outsourcing for a reason.
Coronavirus is like that movie outbreak but in slow motion.
And no monkeys
well, we do write crappy code... so... in a way...
08:17
I wish I could convince my sister to wash her hands more frequently. She works front desk at a hotel and has been staying with me for a few weeks.
@Derick can't remember
@Tiffany where do you live?
also good mornings!
Granted, I'm not likely to be a vulnerable case if I was infected, but limits what I can do because of self-quarantine
@Naruto middle of nowhere, US
Closest confirmed case I'm aware of is three hours away though
are there alot of infections in the US?
seems like it hasn't really reached your end of the world
When I was checking over the weekend, it was over a few hundred, not I dunno what it's at now
08:23
@Naruto us has only tested about 2000 people. It is more a strategy of turning a blind eye
I heard the stock market closed yesterday due to too heavy losses
and yeah that could very well be possible
I wonder how many people have the virus, but just think it's like the flu and just stay home or something
Low wage workers will likely be affected the worst because they need health insurance (if their job even offers it), live paycheck to paycheck, and don't receive paid sick leave
A perfect recipe for a disaster
@Tiffany 650 confirmed cases in the US.
26 deaths
CDC reports 423 confirmed cases and 19 deaths o.O I wonder how updated their info is
Not very. I got those figures from NBC (as of 24 minutes ago according to them).
This doesn't even say when it was last updated.
08:33
March 9, lol
They could be following a different criteria for what they consider a "confirmed case" as well... but I dunno
oh,yeah missed that
Perhaps. The CDC is known to be more strict than public media.
The media pretty much will report every sniffle and sneeze if they could get away with it.
Yeah :/
Sadly flu did a lot more damage in my corner of the world
@Ocramius I also had some struggle to set it up. :) And after removing the non-typed readonly properties from the test data, only the MultipleProxyGenerationTest fails somehow, the others pass. :)
08:39
kinda glad I live in a country where we have a very good social insurance
I have this Mysql query
select r.result as result,
s.Student_Id as id ,
s.student_name as s_name ,
c.Center_Name as center_name,
P.Prize_Name_En as prize_name from results r right join students s
on
r.Student_Id = s.Student_Id
inner join Prizes P
on r.Prize_Id = P.Prize_Id
  inner join centers c ON
s.Center_Id= c.Center_Id where s.level_id =1
order by P.Prize_Id
It works perfect
@NikiC I've updated the RFC with the inheritance rules. Is it appropriate to start the vote now?
but when I change statement inner join centers c ON to left join centers I get error
unexpected ordering of clauses !
@Sherif
@MátéKocsis Looks like you didn't adjust the zend_verify_prop_assignable_by_ref signature in one place, which makes the build fail
yeah, I've just noticed a minute ago :)
08:51
o/
I'm on it
and wow, we finally had a fully green build tonight. miracle
@PHPFan Why are you pinging me?
Any idea about my previous question
people don't like to be randomly pinged m8
09:01
@Naruto May be the reason you don't help them
Not really sure what you mean, but basically if you ask a question, someone who has the time and knowledge will prob take the time to help you, no need to ping random people for it
09:43
is unset($a, $b, $c); guaranteed to be processed left to right?
or more accurately, is unset($this->arrayRef[$key], $this->arrayRef); guaranteed to work as expected?
@DaveRandom yes
winner, ty
@DaveRandom More to the point, unset will never /fail/
Because even undefined variables can be unset safely
@DaveRandom Though I do wonder what you're doing there ... does $this->arrayRef[$key] have a dtor and you need to run dtors in a specific order?
@Sherif indeed and precisely because of that it matters in the case of unset($this->arrayRef[$key], $this->arrayRef) - because if the second one is processed first then the item won't be removed from the referenced array
@NikiC avoiding circular ref in async stuffz
$this->arrayRef[$key] = $this;
09:56
@DaveRandom Yea, I kinda realized what you were doing there after I said that.
@DaveRandom fun
indeed :-P
winner winner chicken dinner
black jack?
no, I just want fried chicken for dinner. I have an excellent recipe!
09:58
I have one too.
It's called KFC.
 
1 hour later…
11:08
@MátéKocsis do you have a failure message somewhere?
Good morning guys #topical
So last night I got an email from my boss at 1am telling me I needed to scale the platform I've been working on by an order of magnitude .. in 24 hours
wow, I get spam messages in chat now?
interesting
11:29
@MarkR Tell them you have COVID-19 ;-)
COVID 19 is the entire reason I have to :|
US education conferences are being cancelled left, right and centre ... (or center?) and doing last-minute virtual shows instead with the company I contract to.
Oh yeah. Boo.
@NikiC what's your opinion on Bug #79349 [Com]: Unlinked anonymous classes prevent using preloading?' bugs.php.net/79349 I'm wondering if I should "just wait" for it to resolved or if it's never going to be resolved because of some low level issue.
11:31
phpDay got postponed to september
I'm wondering what will happen with PHPYorkshire too. I asked about it on Twitter but didn't get a response.
I've my parents visiting, and three trips to .nl booked and paid for
@NicolasGrekas just wait
@NikiC <3 :)
@NicolasGrekas I sent you an e-mail on January 23rd that I never got a reply to. When you have a couple of minutes, please check :)
11:38
@MarkR can you just throw tin at the problem?
if it's a pure php platform, you can just add servers ... if you thought it was cool to write chunks of it in another language, following trends of the day, maybe using buzzwords like microservice ... you get what you deserve ...
@DaveRandom To a certain extent. I've spent 2 years building it out on Kubernetes to scale horizontally, but there's a couple of processes which need to complete in a certain period of time and they're DB bound... and single threaded
@MarkR The golden question then is... which DB?
"sqlite"
11:43
foxpro
Google cloud's 2nd generation MySQL variant
oh, I have no idea how that scales then
a custom built flat file dbms written for a cms in the late 90's ... I win ... mine is stupidest ...
"Google cloud" sounds scalable. "MySQL" doesn't :-P
yeah it has google in the name, it doesn't feel like your problem ... give them more money is probably how to make it scale
11:45
@JoeWatkins that's basically what foxpro is, tbf
well it's essentially dbase
only with added concurrency-based corruption opportunities
Is this a bug? 3v4l.org/IgEYb
@JoeWatkins Care to expand on that?
Is this a bug? 3v4l.org/6eh2N
8
looks like it
11:52
set_error_handler('h');
restore_error_handler();
you think that does something other than it does ...
if there's a bug, it's right there, why would you do that in the real world ?
@JoeWatkins I'm not. Someone is asking me if it's a bug. I honestly don't know.
well as I read it, I expect what I get, but as I think about it ...
What's weird is that var_dump(set_error_handler('h')) gives NULL
Shouldn't it give 'g'?
@Sherif That's because you're using a pre-historic PHP version
@NikiC Explain please
11:58
g 1024 error
f 1024 error
g 1024 error
f 1024 error
Inside of g() var_dump(set_error_handler('h')) gives NULL. This I don't understand.
This is what it prints on current versions of PHP
I also don't get the null
The null is because the error handler is temporarily removed when it is being called
@NikiC Wait, what? No it doesn't.
12:00
yeah it doesn't
@Sherif I'm telling you, that's because you plebs are using ancient (released) versions of PHP
o.0
that explains it, it's removed
That's PHP 7.4
But it's not 7.4.4
12:02
Really?
Ancient is a revision now?
hah, 4 months is relic now ...
Yes
If you're not building HEAD of git, that's like the stone age
there's an up-to-date master build on the branches tab fwiw
@Sjon nice!
Such is the problem of R11 and spending most time talking about master... it's easy to forget. PHP 7.4 compiler errors keep reminding me I can't use union types :|
12:27
@NikiC you've been hanging out with @ocramius?
hurr hurr
and yes, enough to damage him permanently
@Alesana I think you were already thinking along those lines, but a day late here's the updated version: gist.github.com/Danack/… Although it's a lot more letters, it's way more testable, and re-usable.
I possibly said this before....I'd recommend using objects here, rather than arrays, and something like:
Jan 12 '14 at 17:54, by Danack
trait SafeAccess {
	public function __set($name, $value) {
		throw new \Exception("Property [$name] doesn't exist for class [".get_class($this)."] so can't set it");
	}
	public function __get($name) {
		throw new \Exception("Property [$name] doesn't exist for class [".get_class($this)."] so can't get it");
	}
}
or proper accessors.
I was going to add that to the core, but I think Nikic wants to make it default behaviour in edition 2020
12:53
@Ocramius I'll collect some information about the failures after working hours :)
Thanks @MátéKocsis! I will also need to understand why php-src doesn't build for me: JIT stuff, as usual...
@NikiC How far should we go with the implementation before the vote can start? We'll have to fix the auto-vivification related issue beforehand?
13:30
In a phar file, __halt_compiler fails if lowercase ・ Compile Failure ・ #79362
so many nitty gritty details.

1. should <<Attr1, Attr2, Attr3>> work as a short syntax? Currently it doesn't (but i had that before).

2. should multiple of the same attribute be possible? i had that working but removed because of internal complexity. specifically, it prevents extensions and core to do a hash lookup to find if some declaration has an attribute.
1. I think so, people are going to want to do multiline. Using commas feels a bit odd but I get it.

2. Double hashtables?
@beberlei Why would the hash lookup matter?
@NikiC performance? i don't know
If you want a lesson from rust: Validate internal attributes, and validate them hard
I.e. you're gonna have to scan all attributes, check that no attributes are applied on the wrong kind of item, with the wrong kind of arguments, etc
It's not going to be a simple hash lookup in any case
I'd say also check that no unknown attributes from the php namespace are used, but I guess there might be a polyfill benefit there
13:38
ok, so you would be in favor of handling attributes similar to extends <class> relationship as soon as possible, and not like new Foo() in a method body, where its only evaluated at runtime when the method is called?
\p{L} doesn't work alongside \p{Arabic} in a character class ・ PCRE related ・ #79363
@beberlei For userland no, for internal, yes
after andrea's comment i was leaning to move validation completly to the getAttributes() call.
how do i differentiate between an internal attribute vs a userland one?
Claim \php\annotations
@beberlei Think of it as PHP performing a getAttributes() call internally to process its own attributes
Which is really what it would be doing, if it wasn't internals :)
13:40
right, so PhpInternalAttribute that can't be extended from like Traversble, and in compile step php does that for all internal attributes and forces compile errors when they are wrong
that untangles a bunch of stuff in my brain now :)
I'm not sure of the merits of polyfilling internal annotations. Assuming they have some engine significance either they exist and are right, or the behaviour they specify cannot be relied upon, in which case hard error
@MarkR I guess something like "deprecated" could be "polyfilled" to just do nothing
Same with jit/nojit
Those are not function-critical attributes
IMHO that's where something like the @TypeGoesHere would be of merit
Not that I'm saying it's a good idea, but I know Nicolas is already salvinating when he hears the word polyfill :P
<<RequiredType>>
<<@OptionalTypeThatCanBeSilentlyIgnored>> (like discussed in generics)
13:45
@NikiC ok its much easier of course, all internal attributes are already known after resolving class names. however what if people typo something, that would mean we need to autoload every attribute.
lets say i accidently do <<Opcache\Jitt>>
If you were to namespace all internal stuff, anything in it should detonate if not found IMO (unless silenced)
yes yes! right
that ties into what niki said about validating no unknown attributes are used from php namespace. Now we only need to convince @Derick about Php namespace (or subnamespace) ;-)
tbh, I didn't get the whole thing about validator classes yet either
Nikita's token object thingy uses PhpToken
maybe event listener registration is a simpler example for the userland part?
And, IMO, it should look the same for all internal stuff. So, that'd make it PhpAttribute... which I can't say I like either. We can either make an RFC/decision that all PHP internal classes/interfaces live in the PHP\ namespace, or we don't namespace things at all.
13:52
A man can dream (I think it's absolutely essential to do this)
"The date is December 20, 2025... PHP 8.5 has just been launched, with new features, and 300 more classes in the root namespace" (blurgh)
14:06
make an RFC then
@DaveRandom Six legs, definitely insect. So... yes.
o/
A generic "I hereby claim \php" ?
just that one, or including subnamespaces? :D
I think we should claim everything in \php and under.
@MarkR Just that isn't good enough. You need things like Nikita's PhpToken in there too.
And ideally, all already existing stdlib classes too
14:08
@MarkR surely that's implied :-P surely...
and it's "\PHP"
it's case insensitive, tbf...
/me rolls eyes
I'd say \php is off-limits for userspace? \php\<ext> for official extensions. \php\engine for core? or would we want to nest extensions one level deeper?
it kind of doesn't matter what you do there, there would need to be an official "registry"
14:11
When I'm setting our namespaces my general rule is always start as many levels deep as you need to avoid any potential conflicts with separate concerns
use LocalGroup\MilkyWay\Sol\Earth\Net\Php\Dom\Document as DomDocument;
@DaveRandom Oh look at you, not caring about the multiverse.
\C137\LocalGroup\MilkyWay\Sol\Earth\Net\Php\Dom\Document
probably needs \Cygnus\Orion as well
maybe like in rust with #[] and #![] there needs to be a difference between internal and userland macro
14:18
@beberlei that's not what the ! does
It determines which item it applies to
i know, just mentioned it as two syntaxes to do different things
but thats again something people can typo/forget
i see
@MarkR And what about the metaverse? ;)
maybe just validate everything regardless of internal or userland
@MátéKocsis SimpleXML is such a mess :(
14:20
Usually I find that anything containing "Simple" ends up being anything but. ^^
So ... can someone explain to me why-the-f $xml->doesNotExist returns a SimpleXmlElement?
I don't want to have to splatter use statements all over my code for just being able to use PHP stuff. PHP\DateTime? fuck no.
While $xml->doesNotExist->either returns null
@Derick The "PHP" namespace is (imho) not about "part of the PHP distribution" but rather "related to the PHP engine"
Namespacing everything under PHP already doesn't make sense because extensions move between PHP and PECL
@NikiC Then why did you pick PhpToken in tokenizer? ;-)
But namespacing PHP engine annotations is a different matter
14:22
@Derick Use PHPStorm, you won't even notice they're there.
@Derick lol, because I ain't got time for this shit of course :P
I can live with using \PHP for engine stuff
@MarkR PhpStorm. And: no.
Don't go hatin' on namespaces. They're good things. Useful things.
But I think @DaveRandom is right, there would need to be a registry for anything other than engine inside php\
Why is it that I can't catch a TypeError in PHP 8?
Minor Service Outage ・ Gists has Partial Outage
14:29
This code doesn't seem to work in master. Shouldn't it?
All issues have been resolved!
Minor Service Outage ・ Gists has Partial Outage
lol
dafuq
Is there an article or something regarding final that I missed?
All issues have been resolved!
Minor Service Outage ・ Gists has Partial Outage
14:31
@Tiffany Not really. Just some Laravel person saying "don't use final in open source projects"
@AsyncBot It's like the red-zone, white-zone argument at the beginning of Airplane!
@mega6382 I should test this with my cats. They may be too old for it though.
@Derick on Twitter?
Final should always be used until you know you want to allow subclassing, particularly with OSS software. Reduce the surface area you have to maintain.
@Tiffany Yes.
I've seen like three or four tweets this morning regarding final and laravel. Mostly from ocramius and Jimbo
14:37
@Derick lol
what is funny?
Just the regular bullshit I would expect and the fanboy vomit after it :-)
yup
When copy empty array, next key is unspecified. ・ Arrays related ・ #79364
One of the first things Head First Design Patterns taught me is "Favor composition over inheritance"
14:40
> Final shouldn't even be in PHP.
Lovely.
lol
Yeah, the stupid is strong in that thread
@Sherif Works for me
@Tiffany /me laughs in 10-level-deep controller inheritance.
Maybe I should write an RFC to make "final" the default in PHP 8 just to mess with people.
3
I have 21 days...
14:48
Wait, wha
We only have 21 days? o.O
March 10 + 21 days = ?
oh :| now I get it (I was thinking the cutoff deadline for PHP 8 RFCs)
trolled twice by derick ;)
^^
Twice?
14:50
FML.
I don't get it. I'm slow.
@Tiffany It's 21 (and a bit) days until April 1st.
Ohh
Yeah
Had to think about March 31 a little
@MarkR how
The commentary of your project baffles me at times
@Tiffany Chain of responsibility pattern using inheritance rather than middleware so each layer can add its own properties / methods to the controller
@NikiC I guess that means I'm behind HEAD by 1 commit or something
14:55
@Sherif Just to be sure it's not the usual culprit: You don't happen to be in a namespace and have forgotten the leading \ ?
I like middleware, but there's just something so wrong about having to store your data in an array.
That one happens to me from time to time...
@NikiC No, it's not the usual suspects. Recompiling now to be sure
and $this->child->child->child()->func() is even more of a pain
@MarkR added to my list of things to read/learn
14:57
@Tiffany You'll find it in chapter 16 of "Antipatterns"
@MarkR cough LoD cough :-)
@Derick Are we doing an easter egg for php.net this year? :D
I have a few in mind.
@PeeHaa I don't get the reference ._.
@MarkR Law of Demeter
14:59
> PHP would like to announce the immediate availability of PHP 8 written in Golang!
How else could it scale?!
They're all pretty tightly coupled as is, effectively representing a hierarchy of data such as: Admin > Client Page > Library Page > Session Page > Resources Page > Specific Resource.

The specific resource page could pull in from any of the layers below (roles/permissions, requirements/constraints).
/me closes tab, browser, laptop, leaves room, house, country
:P
@Sherif No. They're lame.
@PeeHaa The alternative is something like $request->attributes->get('client')->getPermissionsFor(...) etc
15:05
@Derick stick in the mud :P
imo a better solution would be to stop putting everything in the request and inject whatever you need directly, but I feel like that ship has sailed :-)
But those things typically need layers below them. It's a classic hierarchy of data.
The hierarchy of data is unrelated to injecting a specific thing into the controller though
15:09
Could someone tell me what is the lifetime of closure entry? And how closure opcodes are stored in the opcache
@PeeHaa I use fat models for all my data. I'd say 90% of the functionality is in there.
I like my models slim and blonde
Me too. Although I'm quite fond of red-heads
:-)
I might change the structure at some day, who knows \o/ when I'm bored
15:12
heh
Does it work? Do I have other things to do?
:D
Something was changed between PHP7.4.3 and 7.4.4... and now I'm fighting with segfaults during calls to zend_function_dtor for my addMethod() API during request shutdown. Any highlights about possible opcache changes related to functions/closures? /cc @NikiC
@lisachenko Nothing comes to mind
Ok, thank you, then I'll try to bisect this change...
@lisachenko just looked through github.com/php/php-src/compare/PHP-7.4.3...PHP-7.4.4, not seeing anything that looks relevant...
It is strange, previously my test to add method to the class was working, but now it is broken... Maybe I have local changes then...
15:25
@NikiC Some extensions do weird things with internal functions at runtime. As an example: pdo_hash_methods.
Given this, do you think we should try initializing the MAP_PTR in the INIT handler for internal functions?
@Derick <*sad face*>
<<SadFace>> surely?
Im trying to wrap my head around the array fetch implementation:
```
$arr['some_dimension']['aaa'] = 'some_value';
echo $arr['some_dimension']['aaa'];
```
Supposedly we would look up $arr in the SymbolTable which doesn't exist, yet we still proceed and create the array. Is it safe to assume that even if we fetch an array dimension that doesn't exist, we would create that entry ('some_dimension') in the array and proceed and PHP never throws an error or a notice saying the dimension doesnt exist or the array itself doesnt exist?
@NikiC yes, indeed, opcache.enable_cli=1 just highlighted me an assertion error...
Zend/zend_opcode.c:134: zend_function_dtor: Assertion `function->type == 1' failed
@LeviMorrison Looks like PDO is manually creating methods there, so you'll have to allocate a map ptr slot in there
This seems like a case where you don't want to just use a dummy value, because people might plausibly want to instrument these
15:30
@NikiC Yeah, I have a commit but don't know if it's right: github.com/SammyK/php-src/commit/…
You should be able to use the variant that allocates it on the arena
@LeviMorrison As these methods are not persistent, you want the other one
Thanks. The main reason I brought it up though is that there can be more of these things in the wild, and they are going to segfault.
Is there some way we can auto-init these properly? That's the idea I was hoping to explore.
@LeviMorrison no
This code is literally allocating zend_function structures
You have no control over that
Right, but I do have control over functions that call things.
Code that does not go through APIs always needs to deal with updates
15:37
Hey guys, I have a problem with array_sum, it's kind of putting the 2 strings together instead of summing so in the loop I have 7 and 11 and instead of giving me 18 its giving me 711
foreach($period as $dt) {
$curr = $dt->format('D');

// substract if Saturday or Sunday
if ($curr == 'Sat' || $curr == 'Sun') {
$days--;
}

// (optional) for the updated question
elseif (in_array($dt->format('Y-m-d'), $holidays)) {
$days--;
}
}
$total_days = ','.$days;
$sum = array_sum( explode( ',', $total_days ) );
echo $sum;
}
@Silverfox That depends on the fetch mode
$total_days = ','.$days;
$sum = array_sum( explode( ',', $total_days ) );
makes no sense
$array['foo']['bar'] will throw notices if $array or $array['foo'] don't exist or aren't arrays
@PeeHaa agreed lol
$array['foo']['bar'] = 'baz' will not, and will automatically convert "falsy" values to arrays
Which is undefined variable, null and false I think
You need to model the $array['foo'] part here as two different operations, one for read, one for write
15:40
Why don't you just have a function global counter instead of whatever it is you currently have?
Though more accurately, there are actually 5 different behaviors for this expression (read, write, read-write, for-isset and for-unset)
@NikiC Thanks for the elaboration, it makes more sense now!
16:00
preg_match_all should have a limit parameter ・ *General Issues ・ #79365
> this should be added as a 6th parameter after $offset
> 6th parameter
> 6th
:-(
preg_kitchen_sink()
@NikiC my problem with the simplexml example is that $x->a->b->c = 'Test'; doesn't throw a warning right now, like the same on an object does.
@beberlei yup, that is pretty much the only reason I don't just commit the change :)
could we add the warning on php 7.4? i know derick will say no :p
The alternative solution is to do rm -rf ext/simplexml. Would also fix lots of other bugs
@beberlei nope
16:13
If only we had a PHP 7.5 :p
@beberlei Also, can you tell me how terrible github.com/php/php-src/pull/5252 is?
i would imagine this is a larger BC break, because people do horrible stuff with simplexml
I don't really need that one, but I found the current behavior pretty odd, and from tests couldn't really discern why it does what it currently does
but myself havent used simplexml for 15 years, bceause people tought me not to
Smart choice
16:15
with ext/dom having nicer traversal and manipulation now, maybe its time to deprecate simplexml in 8.0? i still think for 90% of the usage you can build a userland replacement
doesnt help with the change in behavior though
I say fix it. It's really a wtf.
but imagine people with simplexml code, its probably 100 lines or more of things relying on this in weird places. its not something you can easily migrate
can we ship an extra extension outside of php-src that throws more deprecation messages?
Would probably play havoc with:

foreach ($node->childNode as $child) { .. }
All issues have been resolved!
I understand, but this belies the basic idea of what isset means -- I bet there might also be bugs this is masking...
16:19
@AsyncBot I don't believe you any more.
@LeviMorrison well technically objects can implement __isset as they wish
@NikiC I think we came to a conclusion a long time ago that SimpleXML is weird, but because it's used quite a bit (and it's not that bad as a user), we won't try to fix it
@DaveRandom It's Async for a reason...
00:00 - 17:0017:00 - 00:00

« first day (3433 days earlier)      last day (1737 days later) »