« first day (4062 days earlier)      last day (1108 days later) » 

02:36
Good evening, I really wonder after hours of doing research if there is an equivalent of zend_object_store_get_object in php7. Unfortunately zend_object_store_get_obje ct only works until php 5.6. I am trying to get its the objects value in a php_method of a C extension for php but I am unable to do so. I would be really, really happy about any ideas
Was going to say didn't that just become Z_OBJ_P and then some offset magic
yeah...
#if PHP_VERSION_ID >= 70000

/* Structure for Imagick object. */
typedef struct _php_imagick_object  {
	MagickWand *magick_wand;
	char *progress_monitor_name;
	zend_bool next_out_of_bound;
	zend_object zo;
} php_imagick_object;

#else

/* Structure for Imagick object. */
typedef struct _php_imagick_object  {
	zend_object zo;
	MagickWand *magick_wand;
	char *progress_monitor_name;
	zend_bool next_out_of_bound;
} php_imagick_object;

#endif
the zend_object got moved to the end of class structures, for reasons.
> but now, zend_object is variable length now(inlined properties_table). thus above codes should be changed to:
03:16
I can't get this json encoding to lag out on my local machine no matter what I throw at it, 10k connections, i'm learning towards thinking it's hardware specific, probably memory thrashing as you suggested
@MarkR yes that’s what I have seen in a presentation - but it did not work though
@Danack I will take a look into it now, thank you very much
You'll need to combine it with an offset like this:

return (your_object*) ((char *) (obj) - XtOffsetOf(your_object, std));
This is what i tried inside the php_method body
zend_object *obj = Z_OBJ_P(getThis());

combatsystem_object *obj2 = (combatsystem_object *)((char *)(object) - XtOffsetOf(combatsystem_object, std));
combatsystem_object is the custom object of course, but the result is always empty
Oh excuse me theres an issue, instead of (object) its obj. When i try to run it, php just crashes because the class is empty and i try to run a function
if probably throw a breakpoint or t race on obj* and see what it was pointing at first
03:37
Is there maybe an issue in the __construct method i am missing related to the pointers?

PHP_METHOD(CombatSys , __construct)
{
CombatSys *combatsystem = NULL;
zval *object = getThis();

combatsystem = new CombatSys();
combatsystem_object *obj = (combatsystem_object *)((char *)(object) - XtOffsetOf(combatsystem_object, std));
obj->combatsystem = combatsystem;
}

Could try to it with zend_object *obj = Z_OBJ_P(getThis()); also and possibly thats why its getting a wrong pointer i guess?
Don't quote me on this but i think the object has to be created before
Do you have your create_object method set on the object handlers?
Yes i am creating them in a handler

static zend_object *combatsystem_create_handler(zend_class_entry *ce)
{
combatsystem_object *my_obj;

my_obj = (combatsystem_object*)ecalloc(1, sizeof(*my_obj) + zend_object_properties_size(ce));

zend_object_std_init(&my_obj->std, ce);
object_properties_init(&my_obj->std, ce);

my_obj->std.handlers = &combatsystem_object_handlers;

return &my_obj->std;
}
sizeof(*my_obj)
intern = ecalloc(1,
sizeof(php_imagick_object) +
zend_object_properties_size(class_type));
sizeof a pointer is going to be 8.
03:58
This results into an invalid conversion from void* to combatsystem_object*

This is the struct:
typedef struct _php_imagick_object {
MagickWand *magick_wand;
char *progress_monitor_name;
zend_bool next_out_of_bound;
zend_object std;
CombatSys *combatsystem;
} combatsystem_object;

And this is the create handler
static zend_object *combatsystem_create_handler(zend_class_entry *ce)
{
combatsystem_object *my_obj;

my_obj = emalloc(sizeof(*my_obj) + zend_object_properties_size(ce));
Oh i see
04:51
@Danack Funny this came up, because I just discovered those "reasons" earlier today when I tried to put the zend_object at the beginning of the struct.
hehe
05:08
hmm where does the "PHP Fatal Error" come from? I can't seem to find it in the src
Ahhh, doh, I should have realised that
JRL
JRL
05:27
just a sort of quick poll because im curious: given the choice, would you rather see a new opcode to separate > and < (which would include ensuring that opcache and compiler optimizations are consistent with the old opcode), or would you rather see some clever magic to reverse and unreverse the operand orderings at the appropriate times to ensure that the operands were executed in the correct order?
"you" is whoever feels like responding btw, not directed at anyone in particular
imo this is kinda your decision ... design by committee doesn't work for RFCs, you have to choose a way and know why you chose it so you can defend your position
JRL
JRL
i do have an opinion, i'd rather separate the opcodes, and i've already implemented that. i'm more just curious if its a thing other people have opinions about. :)
also joe, im going to switch it to a C enum instead of zend_enum
if i go that route
since you were totally right about tying the zend_enum implementation to those parts of core
It might look a little better, bit you still have a large surface area for bugs to emerge .. the feature you want to add is all about user objects, you want to confine your changes there, having to add instruction sets means work in compiler, opcache, and probably jit
Is it worth all that disruption?
JRL
JRL
it depends almost entirely on whether the changes to the VM are more or less likely to produce bugs, because it's one or the other
We don't like to add instructions if we can use the ones we have, and that seems possible here, it's going to look simplest, and be the most contained
Changes to the VM, in the sense were talking about - passing context from compiler to runtime - are not the sort of thing we expect to produce bugs, it's kinda how the VM works ... Adding instructions, even when they seem simple, can be deceptively tricky before you opened optimizer or jit
05:52
So this may seem like a silly question but... if I do print_r on a variable and the output is:

Array *RECURSION* ... does that mean the array is somehow pointing to itself?
But at the very top level, not a child?
I've got an out of memory error that only appears under very heavy load, the memory usage starts skyrocketing then it OOMs. Im trying to figure out what this data is
JRL
JRL
oh you know what joe, i think i figured out a way to at least avoid the enums in either case
if ZEND_UNCOMPARABLE is changed to 2 instead of 1 and then there is a check in compare_function for > 1 that always returns false, that would fix the erroneous true's that were being returned
Is there an easy / performant way to check if a piece of data is recursive from userland?
@MarkR that might be a programming error
05:59
I don't know why it would only appear under heavy load though, if it was encoding a humongous datastructure i should see it on the other end of the websocket id think
JRL
JRL
github.com/JordanRL/php-src/pull/1/files <-- what i have so far on op overloads for those who want to check it out
accidentally committed .gitignore though
@MarkR tried running through valgrind or asan ? the memory error should be detected under normal load if there is one but might only exhibit bad behaviour under heavy load
unfortunately im having difficulty debugging it, I can only reproduce the issue in production.
still, write a test and valgrind it
Can't say I've used that before.
06:04
don't worry, it won't harm you
TEST_PHP_ARGS=-m
Are those compiler flags or env?
make test TEST_PHP_ARGS=-m TESTS=path/to/phpt
Ah... I'm not sure how I'd go about writing a test for that.
experimentation seems to be the answer here ... you know what functions are being executed in your app, you know the order they're being executed in and the kind of data they are being passed ...
so start with the simplest version you think might raise an error and go from there slowly moving toward real world case untii you see errors ...
It would certainly be easier if I could throw a debugger on the production workload at OOM. I've just added code to write the variable to a global so I can pick it up on the shutdown error handler, thats how I got Array RECURSION, so now im just tweeking it to add a list of keys, see if I can get any more useful from it
06:13
is this coming from core PHP, or an extension you have loaded in production ?
(I assumed an extension was to blame)
472  	switch (Z_TYPE_P(expr)) {
473  		case IS_ARRAY:
474  			smart_str_appends(buf, "Array\n");
475  			if (!(GC_FLAGS(Z_ARRVAL_P(expr)) & GC_IMMUTABLE)) {
476  				if (GC_IS_RECURSIVE(Z_ARRVAL_P(expr))) {
477  					smart_str_appends(buf, " *RECURSION*");
478  					return;
479  				}
480  				GC_PROTECT_RECURSION(Z_ARRVAL_P(expr));
481  			}
482  			print_hash(buf, Z_ARRVAL_P(expr), indent, 0);
483  			GC_TRY_UNPROTECT_RECURSION(Z_ARRVAL_P(expr));
484  			break;
It's triggering when encoding a JSON block, it happens with the native encoder and our cached one. It trundles along fine, then memory goes from about 1GB to 8GB over the course of about 30 seconds and then goes boom.
it looks like, something is missing an UNPROTECT call
@MarkR ah, it happens in core code, I'm unsure how well json is covered ... when I get errors I can't explain, the first place I'll look is how much coverage the tests actually have, usually I find out relevant things while increasing the coverage - like the source of the bug, or what tests to write to cover all the code, and then the source of the bug
but if you wanted to stab around, go checking that PROTECT_RECURSION have matching and correct UNPROTECT in all cases
JRL
JRL
i don't see a test for NAN == NAN
at a glance, I don't see anything in the protect/unprotect thing, but the code says that is what is happening, or something that looks like it ... you need a test you can debug and watch execute in a debugger I think ...
06:33
I've just added a recursive debugging statement to it, im making some progress
I'm expecting an exclamation of my own stupidity anytime in the next few hours.
JRL
JRL
06:50
i think the patch for op overloads is just about complete, barring the lexer/parser changes that @bwoebi was mentioning
07:24
Theoretically, a fully immutable object is impossible to be recursive, right? Because you could never assign a variable back to itself unless you used $this in the constructor.
JRL
JRL
you mean for the refcount?
Being self referencing
JRL
JRL
theoretically yes
I've somehow got an array, that PHP says is recursive, but that I can recursively foreach over to completion.
JRL
JRL
07:55
darn it, segfault
@MarkR Could be memory corruption too. Can you repro on the CLI?
@Derick In production yeah.
And what does Xdebug's var_dump() do?
I don't have xdebug installed on the server at the moment
If you can, start the process to repo, with:
USE_ZEND_ALLOC=0 valgrind /path/to/php script.php
I got to go though, but will be back later.
08:02
ty
JRL
JRL
hmmm
i'm getting an error in existing tests that has to do with STDOUT being an undefined constant, but i'm fairly certain that doesn't have to do with my code
could it be the config of my dev box setup?
Do you may use a autoloader file ?
@DaveRandom I'm assuming this would exhibit the same behaviour as class_exists with $autoload = false (i.e. some kind of class not found exception)? Seems OK, but not sure about use case? (maybe I missed some context?)
08:19
Has anyone an idea why allShipCount is ALWAYS empty?

void CombatSys::addShips(const unsigned fraction, int playerId, int shipId, int amount)
{
this->_PLAYERS[fraction][playerId].shipList[shipId] = amount;
this->allShipCount[fraction] += amount;
this->_CAN_BATTLE = true;
}

Fraction looks either like T_DEFENDER or T_ATTACKER. So, somehow CAN_BATTLE will be set to true but allShipCount keep being 0, even if its hardcoded like += 5000 and im not even calling any other function. Could it be that unsigned turns the "T_DEFENDER" or "T_ATTACKER" to a wrong value somehow?
JRL
JRL
are you writing a game as a PHP extension?
No i am writing a PHP Extension for a intensive calculations
Or basically for around 200k-1M calculations, though i do not understand why allShipCount remains on 0 while CAN_BATTLE switches to true. My only concern could be that unsigned but i removed it and its still not adding up.
JRL
JRL
well im getting a strange one where make test doesn't produce an undefined constant STDOUT but php path/to/test does
it's like they're running different executables
 
2 hours later…
09:55
o/
JRL
JRL
if anyone is feeling generous, i definitely need some help with bug squashing on the automated tests for the op overload RFC. only 3 tests are failing, but i think my dev setup is misconfigured.
o/
JRL
JRL
well its not my config because the CI test also segfaults, i just can't seem to debug it for some reason
is there a problem with doing #include "zend_operators.h" in gmp.c?
 
1 hour later…
JRL
JRL
11:28
hey @Derick you around?
sup
making tea though
JRL
JRL
ah no worries. just wondering if you have any pointers for setting up a build process to breakpoint debug internals. i set up my CLion install according to a guide i found and it does the builds correctly I think, but my make test build and php path/to/phpt build are producing different results.
I don't use an IDE for that, but gdb
As hints, set the USE_ZEND_ALLOC=0 and ZEND_DONT_UNLOAD_MODULES=1 environment vargs
JRL
JRL
awesome, thanks for the tips
yes, success
JRL
JRL
11:57
this test case is amazingly difficult to understand
runtime_compile_time_binary_operands.phpt
apparently I broke NAN comparisons between compile and runtime somehow
JRL
JRL
12:09
okay, well all tests pass and the feature is done
on my box anyway, i imagine CI will pop a few more errors
12:33
\o
JRL
JRL
o/
12:48
Why the hell does this work? 3v4l.org/E9caH self:self::doBar();
Oh, goto label
JRL
JRL
how is that not a compile error?
oh
goto label ?
ah yeah lol xD
Having that comic in mind, just why
why
110 PRINT "lol"
120 GOTO 110
RUN
13:04
github docs 503'ing :-|
@FlávioHeleno link ?
Error 503 certificate has expired
certificate has expired

Guru Mediation:
Details: cache-eze19326-EZE 1638191177 2115237046

Varnish cache server
yep
internal tls certificate expired
JRL
JRL
i got a 503 from a google search an hour ago
13:07
oh well. seems that I'll be blocked for a while..
back to unencrypted IRC I guess
(?
I thought about IRC a few weeks ago when I was deciding what type of "comms center" I'd use to integrate IoT stuff of my home
ended up with slack because it was easier and required 0 infrastructure work upfront (besides home infrastructure obviously)
depends if you need to take action on certain messages
my idea is to have bots (webhooks), cameras, buzzer etc in a single place
then you want a work queue to fire different actions and a socket server in front of it
13:12
so I can use WebRTC to pick up the buzzer from wherever I am, control locks from chat etc
@ln-s exactly :-D
php doable
:P
def :D
php can do pretty much anything
with a bit of elbow grease, sweat and tears. hahaha
13:37
spent 2h+ to find out that the issue is the http client implementation.. facepalm
 
1 hour later…
JRL
JRL
14:41
does make on php-src not build the entire ext dir?
or is that something i need to do with a ./configure or ./buildconf
you should have the appropriate --enable-X / --with-X while using ./configure
some ext are always built
do ./configure --help for help
JRL
JRL
i just realized that gmp wasn't getting built into the make i was running make test off of
--with-gmp to build with gmp
JRL
JRL
oh that's why
i didn't even pay attention to it, but i copied from an article that ben wrote on configuring clion for php-src
and he had a ./configure command that had --disable-all
14:58
@Asgrim it would literally just skip the autoload step, i.e. the same ReflectionException you get now when you give it a non-existent name. Use cases I have had many and varied over the years, they are all typically very "meta" tasks but that is generally true of reflection, e.g. when building autoloader augmentations and stuff like that
the key difference between that ctor and the *_exists() functions is that you need to know what type of symbol a name relates to beforehand, or chain them together. It wouldn't be adding any new functionality tho, for sure
15:15
@NikiC I've put together the code to migrate bugs.php.net contents to github issues. result: github.com/flavioheleno/bugs.php.net/issues code: github.com/flavioheleno/bug-xfer
JRL
JRL
hmmm
is there a way to test what exactly one of the object handlers are?
i want to check to see if one of the operands is an object from an extension that has provided its own handlers for do_operation or compare
so as to not break extensions
JRL
JRL
15:34
i can check if the type is ZEND_INTERNAL_CLASS, but that doesn't tell me if the handler was replaced. if it hasn't been replaced, then it would do two extra passes in the compare method that are unnecessary
it would pass tests, but it's less efficient
ah, you can just compare the literals
16:17
@bwoebi so maybe stuff like union or other operators from set theory? If so, do you have any vague thoughts about how they would get added to the parser?
@Danack I think that's pretty much impossible with just bison. Swift has that but you need to specify the precedence of the given operator and it's associativity, which means parts of the file need to be parsed before expressions can be parsed.
JRL
JRL
i think that question was in the context of expanding my RFC out later into arbitrary infixes/operators
would be interesting though.....not being able to extend the parser from userland is a limitation.
@Danack I'm not sure what you're referring to?
yesterday, by bwoebi
Similarly I'm still not happy with the choice of __add() vs operator +(). The latter syntax opens us for a future scope of arbitrary operators, while the former rather blocks it or makes it hard to consistently fit in.
16:21
@Danack ah, because union and intersection would just be | and &
@bwoebi so were you thinking of a different operator? such as ....?
@Danack nothing specific, more like some haskell operators PHP does not have if one wants to experiment with that.
>@>
JRL
JRL
we'd probably need infixes that aren't known to not be compile time errors in order for that to work
in any case @bwoebi i'm basically done with the implementation on the RFC
@Danack In Swift you can make up operators as you want. It's fun for a few select libraries like parser combinators but honestly in most cases it's pretty useless.
I have never actually used it in real code.
JRL
JRL
16:26
i'm mostly making sure that my RFC doesn't make that impossible in the future, but there's no work on it in this project really.
github.com/kareman/FootlessParser Back in the day I thought it was cool, nowadays I just thing, why...
16:49
@IluTov I don't know about that lib specifically, but it seems similar to nom in the Rust ecosystem which I've liked so far.
My main use for most operators in my C++ newbie days was when writing a game scripting engine for my uni thesis, I made fair use of operators, mainly assignment which doesn't seem relevant to PHP
@LeviMorrison Parser combinators are cool. I'm just not sure custom operators improve readability in a decently expressive language.
17:25
@JRL So is it time to start working on the English, if you've got the C written? :-P
Hey folks!

A PR I worked on didn't make it to the PHP 8.1 changelog.
And yet the new functions are present in the docs!
As a new contributor, I'd like to learn how I can make sure the PR got in... and, if so, to request a change to the changelog...
Check the git repo?
JRL
JRL
@Crell yes, though i'm not going to bring it up for serious discussion for a little bit yet
@JRL Good, that gives us time to figure out the English, and refine the design accordingly. :-)
What do you want/need me to do?
JRL
JRL
i think there's still optimizations that can be made, it's my first contribution to php-src so i want to get code reviews done, and i also want to leave some time for @bwoebi to work on the parser changes they wanted to include
17:28
Anyone knows how to pass parameter inside a php method call in C++ from php ? I am calling it like $cbSystem->method(parameter1, parameter2, parameter3) but inside the php_method it seems i cannot get these parameters, i added long param1, param2, param3; but all 3 are undefined. Anyone may has a link or some example?
JRL
JRL
well, i think the proposal part needs to be more focused on the code that PHP developers can do as a result of this RFC, and that section needs to be near the top
I also think that while it was good for planning to include some of the "bad examples" that I am aware of as the RFC author and why i think they shouldn't block it, they probably can just be omitted (many are confusing anyways)
So, sales pitch. Is the current RFC text still technically accurate?
JRL
JRL
examples are the queue example that i used to show how the reassignment operators would interact with "bad" implementations
yes, it is still technically accurate
it is however missing one thing, which is the opcache impact since I added two opcodes
I did indeed change the opcache as part of my patch, but i basically just looked at the less than parts of the optimizer and copied/adjusted them
so i don't have a deep understanding of that impact
rather, i changed the optimizer in the Zend folder, i actually am not sure that updates opcache since opcache is in ext
the PR linked at the bottom of the RFC is fully up to date with all commits
i was very, very thorough in the RFC. i think that can be a good thing, but my way of writing may be more verbose than necessary, especially in technical documentation
next weekend i'll finish up the ordering implementation. i thought of a way to do it that will drastically reduce the code impact, but i'll need to undo most of my changes first
@Crell IMOSHO I really think the RFC text needs to be started from scratch.....it's just gone in completely the wrong direction.
JRL
JRL
it's funny what coming back to stuff later can do, your comments in august are part of why i expanded it so much :)
but distance gives more perspective
17:38
Well, apologies for saying whatever I said that gave that impression...
yesterday, by JRL
@Leri then what value would the interface provide exactly?
It allows static analyzers to check the code is valid or not.
So should I start over, tweak, or just hack-and-slash and see what happens?
withouth having to manually check which methods are implemented.....and also the runtime type checks....
JRL
JRL
no, that feedback helped me flesh out the feature, and your feedback now is helping to make the document more concise
i view both as helpful
cmb
cmb
@BenMorss in php-src, there is NEWS and UPGRADING. UPGRADING is for bigger changes (like AVIF support). NEWS is for minor changes (such as bugfixes), but also can have the info from UPGRADING (without the details, though); this is often overlooked. The migration guide is basically a translation of UPGRADING to our doc system.
JRL
JRL
as to the interfaces, they help provide information but that information is a lie @Danack
except for perhaps Equatable and Comparable
but interfaces like Multipliable would lie to the developer about whether the object actually can be multiplied
the interface also cannot be provided without the never type in the interface
unless we want to remove the typing of arguments which i think is one of the strongest features of this implementation
17:45
@cmb
oops
I thought "Return" would autocomplete :)
cmb
cmb
"Username auto complete is tab, not enter." :)
@cmb I feel like it would be useful to include AVIF in the changelog, as long as we're including gd changes like "Convert resource<gd font> to object \GdFont."
but of course I defer
cmb
cmb
@BenMorss yeah, makes sense; I'll add it
@JRL So what's my todo here? :-) Or should I start with a technical review of the API and feedback there before messing with the English?
(I can probably figure out the behavior from tests, if they're good tests.)
@cmb yay!
@cmb I will also write to the internals lists about that little library folks wrote to find the size of AVIFs
JRL
JRL
17:49
hmmm, probably a technical review but i don't think it needs to be too deep. as far as the RFC goes, i'm impartial to starting over vs. hack and slash. :) really it's whatever feels like less work for us to get to the end point. so maybe an outline of what the endpoint is?
I'll have to look it over again to figure out what the endpoint is. :-)
cmb
cmb
@BenMorss ah, thanks!
(Other than a yes vote, of course.)
JRL
JRL
endpoitn of the feature is covered in the Design Considerations section
Backwards Incompatible Changes needs to be updated. The main BC break is that some places that previously threw an Error now throw an InvalidOperator.
under RFC Impact To Existing Extensions: extensions which defined their own compare or operation handlers can now have those handlers overridden in userland if the class is open for extension.
or, wait, that isn't true. it's if they are the right operand of a binary op and the left operand implements and overload
this affects (that I know of) ext-date, ext-gmp, and ext-decimal
in the future, i would like to create a way for extension to create a deferred handler so that the op overload handler can run first, then handoff to the extension handler if the user hasn't implemented overloads of the extension class
18:17
o/
Hola, long time no see
What's happening with SO, I've been using it kind of rarely lately, and it seems it has become a place where people are scared of asking questions because there would be 5 people who would comment something sarcastic underneath
And people answering their own questions.
JRL
JRL
mainly i don't ask questions because any time i do someone comes by who thinks they're a wikipedia editor and says "this was asked 7 years ago in this question that includes none of the same keywords your moron, closed as duplicate"
Yeah and that
btw I used to hang out in this chat 7-8 years ago non-stop
but people have changed as well
@ziGi So business as usual? :P
Also o/
Hey, sup \o
Long time no see
I moved back to my country and stopped using SO
PeeHaa
How's life been
18:31
@bwoebi I checked real quick, I think symbols as method names would require lookahead because of references. function $&+() {}, $ representing the position in the parser, it would take a lookahead of 2 to see if & is the function name of the return-by-reference flag.
JRL
JRL
not in this RFC if it's specific to the RFC
because:

1. it won't use the function keyword but the `operator` keyword instead
2. the RFC doesn't include any operators that start with & or @
Oh it has a different keyword, I missed that. That would work.
JRL
JRL
lol, i also missed that at first when bwoebi mentioned the idea
the keyword will also be restricted to class definitions
oh, derp, it includes the & operator for bitwise and
anyone have an idea why travis is showing segfaults where my build tests don't: app.travis-ci.com/github/php/php-src/jobs/550020156
@ziGi Busy busy. Especially now with the end of year craziness :)
@JRL & would work as long as operators don't support return by ref. Not sure if there's any use for that but it does seem like an arbitrary restriction if the only limitation is syntax.
JRL
JRL
18:46
i honestly haven't even considered return by reference for operators. don't see where you'd want to do that or why.
I can't imagine return by reference being useful but possibly yield by reference? I don't know how that would be useful either though tbh
I don't know anything about y'alls conversation right now though so probably not relevant :P
JRL
JRL
definitely gonna need some input on the implementation, the CI builds are timing out and having some mysterious segfaults that i can't reproduce
JRL
JRL
19:12
i'm worried that i somehow tripled execution time with my patch, lol
@JRL That would be bad. :-)
JRL
JRL
ya
thing is, im not seeing any of these things on my local builds, but ALL the CI builds are taking huge amounts of time, and the Azure builds are timing out at 60 minutes and 75 minutes
im not seeing the segfaults locally either when i run the same tests
it must be a build specific thing for config
if anyone spots an obvious error/reason for the slow CI builds, let me know: github.com/php/php-src/pull/7388/files
 
1 hour later…
20:36
@JRL ugh. Maybe link to news-web.php.net/php.internals/115719 news-web.php.net/php.internals/115752 in the RFC, as it's going to come up in the discussion .......but this kind of feels like there might not currently be a great choice...
JRL
JRL
@Danack Yeah, I can do that. Nikita explaining my point for me will avert a lot of people confidently being incorrect.
Well, no.
but when they are, you can ask them "did you read and understand these links?", and they'll make up excuses of why they don't need to read all of the relevant information before having strong opinions.
JRL
JRL
I actually started working on the RFC planning to provide interfaces for everything, but that reply from Nikic 180'd my opinion on it.
especially when there was so much pushback on never for parameter types
... nope, I just spent a good minute trying to come up with a "never" pun to the lyrics of rick astley but i failed.
JRL
JRL
you know
the PHP namespace may actually be useful for enums
20:51
Feel free to fight that battle :P
JRL
JRL
if we start using/providing enums from internals, it could benefit programmers a lot. however, it would suddenly take up more and more names in the global namespace
every enum that is a good one will have a somewhat generic name, so taking it in the global scope could potentially be high impact
We made all these arguments at the time about using \PHP =\ the votes on our RFCs give an indication of what a lot of people thought

« first day (4062 days earlier)      last day (1108 days later) »