« first day (3549 days earlier)      last day (1382 days later) » 

12:00 AM
Assertion fail in __zval_get_string_func, which causes segfault in release buil ・ Scripting Engine problem ・ #79778
 
12:32 AM
Assertion fail in zend_wrong_string_offset ・ Scripting Engine problem ・ #79779
Stack overflow in zend_string_init ・ Scripting Engine problem ・ #79780
zend_mm_heap corrupted in zend_array_destroy ・ Scripting Engine problem ・ #79781
Segfault in cleanup_unfinished_calls ・ Scripting Engine problem ・ #79782
 
 
1 hour later…
2:06 AM
Segfault in php_str_replace_common ・ Scripting Engine problem ・ #79783
 
 
1 hour later…
3:12 AM
@Girgias you should ask @RemiCollet on twitter his opinion, though he also pops by here.
 
 
1 hour later…
4:35 AM
Assertion fail in _zend_is_inconsistent ・ Scripting Engine problem ・ #79784
Assertion `(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))' fail ・ Scripting Engine problem ・ #79785
 
5:50 AM
I had no idea such a thing exists
 
@Girgias have you checked to see which versions Oracle still supports? You can ask Remi, as @Danack suggested, or email Johannes
 
I'd like to write an RFC which IMHO can improve a PHP Language Syntax gist.github.com/brzuchal/85f743e0de040dc4c952ace3d13e1dea
// remove parens gives a clear sign that it's not a function
declare strict_types = 1;

// require parens in constructs allowed to be used like a function
false or print("always returns 1");

// exit and die never returns value like echo and __halt_compiler
$foo = exit; // should be parse error
$foo = die; // same here
Any thoughts? In linked gist there's a short analysis of other language constructs which have similar restrictions
 
6:07 AM
@brzuchal echo "no\n";
 
Is that a no for making such changes or what?
Any valid arguments against?
 
it's a... leave my unparenthesised echo's alone :P
 
@MarkR the above proposal has nothing to echo
 
then why the "// require parens in constructs allowed to be used like a function" ?
 
@MarkR echo cannot be used like a function
$foo = echo 'foo'; // that's a parse error
false or echo 'foo'; // same goes already here
only print can be used like a function in write context
but then IMO parens should be required
 
6:15 AM
Those i'm a lot less fussed about, when you're writing it just be sure to be clear exactly what you mean and what is covered or not.
anyway 7am and ive just finished boarding out my attic, bedtime o7
 
@MarkR Roger that. How does that look in general ?
Oh I just woke up 2h ago, sleep tight
 
and the gist looks fine, more detailed than I was originally commenting on based on the paste in here.
 
thx
➜  ~ php -dzend.assertions=-1 -r 'var_dump(assert(false));'
bool(true)
Wow
The docs for assert says the return value is FALSE if the assertion is false, TRUE otherwise - which is an invalid statement
Should it be also considered on my list of changes as a syntax error when used in write context?
The assert changed over from PHP 5 to 7 in the way of execution, forbidding it's use in write context if it always returns true when assertions are disabled maybe would be a good idea to go into PHP8.
IIRC @cmb we were discussing part of those changes couple of months ago, any thoughts on chat.stackoverflow.com/transcript/message/49820840#49820840 and on adding assert a syntax error in write context?
When is a feature freeze?
Oh on now Aug 4th, which means if I write RFC Today I'm on the party for PHP8. Yay!
 
7:26 AM
I wrote a RFC draft wiki.php.net/rfc/language-constructs-syntax-changes anyone willing to help and check if it's clear in understanding?
 
7:38 AM
@brzuchal if you don't get anyone between now and three hours-ish, I'll have a look
 
@Tiffany Thats awesome, thx
 
8:06 AM
$foo = exit; // should be parse error
$foo = die; // same here
@brzuchal What about or die?
or sorry just in write context, i didn't say anything 🤐
It's hard to recognize in the parser stage though.
Hm, rereading that, write context usually refers to the lhs of an assignment. In your example it's on the right. $x = $y or die; makes $y truthy, that should definitely continue to work.
 
@IluTov so in general you consider it ok?
 
@brzuchal Would require_once 'file'; still be ok?
In other words, it's just about declare, exit, die, print and __compiler_halt exclusively right?
 
@IluTov Yes, didn't though about require and family
I may think of it and add it, but later Today
 
@brzuchal Please implement the RFC first.
 
The thing is, I almost never use any of those. Thus I personally don't see the need for it. Also, if we offer an alternative syntax it should be significantly better IMO.
Also, I think most cs guidelines don't do parens so it could be annoying for those that are now required.
 
8:32 AM
@NikiC before discussion or before voting? how much time do I have if before discussion?
@NikiC and pls tell me what you think of it
 
@NikiC Should class constants allow callable and iterable pseudo types given that you can set constants to strings and arrays?
 
@brzuchal 2 weeks discussion minimum, 2 weeks voting minimum
but i would imagine Sara will drive you off the grounds for an RFC that is so close to the feature freeze :) if you start today and get the vote done on August 1st, you only have 3 days to merge. nobody is waiting for the PR to get merged if you are late by 4th august the feature is out
 
@beberlei is it actually a feature at all? :P
Ok I get it
 
9:06 AM
@moliata iterable yes, callable no
 
@brzuchal I think at least a POC implementation should be necessary before discussion starts in order to know that you're not pursuing a pipe dream. By the time voting starts, you should have a nearly finalized implementation, at least.
 
Well, thx @Tiffany @NikiC @beberlei @MátéKocsis @IluTov I see no strong objections I'll try to start with the implementation POC Today and think of the require family constructs, if by tomorrow there will be no more objections and will have some POC then will try to push RFC for discussion at latest on Sunday
 
9:35 AM
@Danack Just sent him a Twit
@Tiffany They've dropped support for anything below 5.6, and have some support for 5.6 on some distribs, but from what I've seen it is technically EOL
 
@Girgias Do you mean the MySQL server version, or the MySQL client library version?
 
@NikiC MySQLi extension without the mysqlnd driver, so that would be the client library I imagine?
 
yes
I already bumped the minimum version to 5.1 in master
 
Does the client lib have a different EOL timeline than the server?
 
But if remi is fine with it, we can bump to 5.5
 
cmb
9:43 AM
@brzuchal I think the RFC should better distinguish between "statement" and "expression"; e.g. what is called "write context" seems to be "expression". With that change, the RFC would propose to make exit/die "statements", what would be inconsistent with throw which just has been turned into an "expression".
Also note that an "expression" (expr) can always be wrapped in parenthesis, and explicitly forbidding that would introduce yet another inconsistency (future scope section).
 
I've asked him for 5.7 as I saw that 5.6 is apparently EOL, but then I saw that they support 5.6 on some distribs so... will see what he replies
 
@cmb I think die and exit should be considered both a statement and expression and that should determine the requirements of the parentheses or not, what you think?
 
cmb
hmm, throw (new Exception("...")) as well?
 
exit; I consider a statement therefore it should be in write context....
@cmb noone should write $Foo = throw new... Right?
 
@brzuchal No but they could do $foo = foo() ?? throw new Exception();
 
9:55 AM
That's weird though
 
@brzuchal Lol, this was just voted on 2 months ago or so :)
You voted yes too :D
 
@IluTov well then I was blind, it doesn't make much sense $foo will never get a value
It does make sense for fn()
 
@brzuchal It will, but only if foo() is not null
 
It'd be better with 'or'
 
cmb
@brzuchal "should" != "must"; see 3v4l.org/POJuM
IMHO, or and and are terrible operators
 
10:03 AM
This ^
 
Yes but by design they was supposed to be used with statements like die() ;
 
@brzuchal I mean, they were supposed to be more readable but the precedence still makes no sense. If you exit the program precedence of the assignment is completely irrelevant.
 
@NikiC any particular reason to make callable not allowed?
 
So, whether you interpret it as $foo = (foo() or die); or ($foo = foo()) or die; doesn't matter in that case so why make the precedence weird?
 
@moliata see the rationale in the typed properties rfc. I believe the same reasoning applies.
 
10:10 AM
@IluTov agree and there's also yield
I may need to drop that single idea will think it over again, but the rest remains valid
 
@NikiC but in class constants, only global functions and static functions would work, right? So there wouldn't be anything context dependent, right?
 
@moliata static methods are context dependent.
 
@NikiC okay, so that means we should allow all types except for void, callable and object.
 
@moliata You can allow object
E.g. in the form of ?object = null
It's not useful, but it's not wrong either
 
@NikiC okay, thanks
 
10:19 AM
@NikiC @bwoebi FWIW, I did find my memory leak... except for in one place. But I know how to look for it now with that watch expression
 
@NikiC sorry for bothering but I suppose declare(strict_types=1) has no effect on typed class constants since the type check needs to be performed anyways?
...just like with typed properties with default values
Should have no effect*
 
@moliata Correct, it should always be strict
 
@NikiC and last question :), is it possible to get INHERITANCE_UNRESOLVED returned from zend_perform_covariant_type_check when doing a check class constants?
a check for*
Or that is relevant only for methods and properties
Not sure if I need to implement compatibility obligation for typed constants
 
@moliata That depends on whether you allow the use of class types
 
@NikiC I don't think we should? Since it's not useful besides for ?stdClass = null
or ?(any other class)
 
10:56 AM
Morning
 
Morgen
Relinking a question I had earlier now that more people are around...
13 hours ago, by Tiffany
I have a question which is rather long, so I pasted it into a gist. I believe it's a general architecture question, but it may be an Amp question.
If it needs explained better, since I understand it's a bit confusing, I'll try
 
My theory was wrong, the JIT can handle pretty much all instructions, so that doesn't explain the mediocre benchmark results... github.com/php/php-src/pull/5806
 
11:11 AM
@Tiffany "Or is there a design reason for doing it this way?" Decoupling abstraction. Consider implications of having methods requestJson, requestXml etc in Client class.
 
@Tpojka if the a Request object is passed to the Client class from outside, would it still be decoupled?
 
retrieve wants html and everything it needs to know/get is html or exception. When it wants json other time everything it needs to get is json or exception and that is done in Client class same way how it is done for html now.
 
I think that makes sense
Realizing I'm still a bit tired :S or I need more caffeine, one of the two
 
@Tpojka technically, it was written by someone else, I copied it in hopes I'd understand what's going on, but I didn't, and it wasn't explained to me
 
posted on June 27, 2020

I think I’ve finally perfectly padded my resume. Recent changes have resulted in a few calls, but nothing promising as of yet. If only HR departments were as thrilled with my resume as I am. One of these days I’ll sucker someone good into hiring me. In the meantime, I grabbed some contract work. I’m no longer in dire straights. Hm... What a terribly dated expression. Have a good wee

 
@Tiffany Comments are good start. Even just basic ones like arguments/return/exception. It helps a lot setting mind in good position for understanding what's going on. But for sure adding description should be mandatory imho. IDE's do that by default with "/" + "*" + "*" + "Enter". At least PHPStorm.
 
12:20 PM
Can someone see why this is failing on release builds? github.com/php/php-src/pull/5803
 
1:06 PM
@NikiC in cases like these (e. g. pastebin.com/i1DFU1Vs), when should I call zend_update_class_constants? Typed properties do it during object composition (i. e. _object_and_properties_init) but that's not possible with class constants.
 
@moliata You should not call it, it will get called.
 
When? Class constants can be accessed statically without requiring a class to be initiated. That's also the reason why (new Test())::TEST works and Test::TEST doesn't for me.
by works, I mean, the type check is triggered
@NikiC have updated zend_update_class_constants to do a type check if the zval is IS_CONSTANT_AST. That works great as long as I do (new Test())::TEST since _object_and_properties_init calls zend_update_class_constants. If I wanted to do Test::TEST, the type check is obviously isn't done
I have updated*
the type check obviously isn't done*
@NikiC nvm, forgot to add a check ;)
 
clone of object is not cloning changed Colorspace ・ imagick ・ #79786
 
2:08 PM
mb_strimwidth does not trim string ・ mbstring related ・ #79787
 
 
2 hours later…
3:56 PM
Assertion `idx' failed in gc_remove_from_buffer ・ Scripting Engine problem ・ #79788
 
 
3 hours later…
6:34 PM
Assertion `!(executor_globals.exception) || ret == T_ERROR' failed ・ Scripting Engine problem ・ #79789
Assertion `0' failed in increment_function ・ Scripting Engine problem ・ #79790
Assertion `0' failed in _zendi_try_convert_scalar_to_number ・ Scripting Engine problem ・ #79791
Assertion `(iter->ht)->u.v.nIteratorsCount != 0' failed. ・ Scripting Engine problem ・ #79792
 
6:53 PM
Assertion `p->refcount > 0' failed. ・ Scripting Engine problem ・ #79793
 
good god that code formatting...
 
7:49 PM
Good afternoon everyone. I'm new to macOS. I'm trying to compress a file with a password, but it's always attaching a file generated by macos. How to attach without these files?
zip -r -e myfie.zip ./*
 
8:05 PM
I've tried several alternatives, but there is always a file in the attachment starting with: ._
 
8:34 PM
Fatal error: Declaration of Doctrine\DBAL\Driver\DriverException::getMessage() must be compatible with Throwable::getMessage(): string - github.com/doctrine/dbal/blob/2.10.x/lib/Doctrine/DBAL/Driver/… - this looks like a BC break?
 
@beberlei yes, edge case affecting old versions of doctrine dbal
DriverException used to redeclare the getMessage() method for some reason
 
@NikiC does this only affect the case by extending interfaces? I imagine its the same if I declare a getMessage() on a concrecte exception?
ah its final
 
@beberlei It's a final method
That's why edge case. Only happens if somebody extends the interface and redeclares the method there
 
yeah thats fine :)
so, is JIT faster for complex object graph hydration code like Doctrine? result: probably not ;)
with trigger 0 and 3 it gets slower with 5 its the same
its really important to use php-cgi -T $count instead of the cli for jit tests though
trigger 5 is a bit faster
meh, segfaults with tideways xhprof on and JIT :(
 
9:12 PM
@beberlei A little disappointing at first but what it really shows is just how optimized php already was.
But I really hope all that complexity from the JIT will pay off at some point.
 
woah its amazing to see with 1205, that the profiler doesn't catch anything anymore :D
the crash is only with 1255, 1235 also works
 
9:47 PM
@IluTov I'll try to look into my math thing with JIT, does anyone know how to set it up locally? (Maybe should just use my server but I just used the default Apache config it came with and I have no clue where the config file lies)
 
@Girgias use php-cgi
php-cgi -N 100 => 100 reptetitions
 
10:13 PM
@beberlei Does that require NGNIX if I want to do it on a server?
 
@Girgias what do you mean by want to do it on a server?
its php-cgi -T 100 not -N btw sorry
 
@beberlei Well, the math code which I'm thinking of running takes about 30s with OpCache on PHP 7.4
 
it acts as the client and srever, it makes 100 "requests", without requiring a webserver, the php process stays "online", i.e. 1 MINIT / MSHUTDONW
 
Huh
 
its like php, but 100 times, and without restarting the engine
 
10:16 PM
And to enable opcache is it the usual -d flag?
Or should I tweak the INI settings?
 
yes, usual -d flag. i put it together in this little post for future reference: beberlei.de/2020/07/05/…
 
Neat, will use that then
Will need to make my thing a standalone script then cause currently it sits being a small web interface with GET requests
 
10:35 PM
@NikiC Do you know what these .aword =>b instructions are about in the JIT? github.com/php/php-src/blob/…
I'm assuming it's a jump but I can find nothing about .size =>label sytnax in the documentation. corsix.github.io/dynasm-doc/instructions.html
 
11:04 PM
twitter.com/HeckPhiIIy/status/1279131192277831681 (both of my cats have done this to me)
 

« first day (3549 days earlier)      last day (1382 days later) »