« first day (4250 days earlier)      last day (924 days later) » 

07:18
github.com/php/php-src/pull/8708 I'm thinking of writing an RFC about this. Does anyone here have any opinions?
 
1 hour later…
08:29
@Danack I think this would be in "Extensions design". Stubs probably replace the "Registering and using PHP functions" bit?
@sj-i I don't mind, but what happens if one uses <?php /* ... */ =?> ?
@Girgias It's just a closing tag without eating the trailing new character, so nothing happens, like the case of <?php /* ... */ ?>
Right, I still think maybe adding a test showing this behaviour where you do some more complicated templating using the standard tags could be a good idea
@Girgias thanks!
 
2 hours later…
11:07
@MarkR I don't think anybody needs map<K, V>, when he can have array<K = int, V>
morns
@bwoebi array<K = int, V> would presumably still allow you to do things which wouldn't make sense for a map e.g. $foo[] = 1;
@MarkR which really is just a shortcut for $foo[max(array_keys($foo)) + 1] = 1;
I can't remember ever encountering a map structure that had the equivalent of push, other than PHP arrays of course.
12:11
@cmb Do you know who works with the German translation? As I think the WIP status on language-snippets messes with the revcheck a bit: github.com/php/doc-de/blob/master/language-snippets.ent#L3
 
4 hours later…
16:44
@Danack Honestly, it wouldn't be a conversation. There's only 3 SAs that matter, and they already have a rough consensus on a syntax between them. Honestly I'd prefer a standardized attribute to "moar through unilateral docstrings."
@Crell Phpstan, Psalm.. what's the other?
PHP contributors: ugh, this project so hard to update due to the BC policy.
Also PHP contributors: We'll only need to have 1 version, and it won't need any iteration.
@MarkR PHPStorm
I thought that followed either phpdoc or psalm
At least until they do something silly like their ArrayShape's then everyone refuses to use them \o/
All 3 are reasonably close, but have variation. My point simply being that there is no "conversation" in user space about what the syntax should be. There's 2 people maintaining SA libs, and one company. Whatever they do is what it is.
17:07
Does anyone know why REDIR_TEST_DIR is a thing that needs to be set, to allow PDO tests to run? github.com/php/php-src/blob/… seems like it has a sensible default to use?
17:21
Is there an example anywhere of how to use the functions in zend_enum.h to create enums in extensions? I used a stub to generate the arginfo, but I'm wondering if something is wrong because my test has a fatal error because the class isn't found.

I notice that the generated arginfo for standard namespaced classes uses the `INIT_NS_CLASS_ENTRY` macro, but there doesn't appear to be a similar macro for enums.
This is a backed enum, and it doesn't appear to automatically implement the BackedEnum interface. I wonder if I should explicitly state that in the stub
I think that the zend_test extension defines a backed enum
@ArnaudLeBlanc Thanks. I'll check that out
yep... ZendTestStringEnum. I'll follow that and see how it's implemented. Thanks
hmm... looks like they just call register_class_ZendTestStringEnum() in the MINIT, and that's it
oh... doh! I forgot to call the register function in MINIT
zval enum_case_Baz_value;
zend_string *enum_case_Baz_value_str = zend_string_init("Test2\\a", sizeof("Test2\\a") - 1, 1);
ZVAL_STR(&enum_case_Baz_value, enum_case_Baz_value_str);
zend_enum_add_case_cstr(class_entry, "Baz", &enum_case_Baz_value);
surprised that's not a macro.
the issue was PEBKAC
18:30
Now, for my next trick... how do I assign an enum value to a property in C code?
18:45
@ramsey never done it, but possibly getting the enum as an object, with one of these functions, and then 'just' ZVAL_OBJ_COPY(&data, object);.
18:59
@ramsey Make sure to document this all in the internals book when you're done
Does the internals book need a PHP 8 section, or would all this still go into the PHP 7 section?
My understanding is everything is written to be current, and then can be archived off into old sections?
/me shrugs
It's missing an entire section on arrays and hash tables in the PHP 7 section, but the PHP 5 section for that info seems out of date and doesn't compile on PHP 8, so I haven't been using the book much, since I didn't think it was up-to-date
Well, it's our "job" to keep it up to date really. It'd be silly to have multiple people to have to figure this out for themselves.
I'm still in the process of figuring it out :-)
19:09
Veel succes ermee :-)
20:20
Thoughts on dynamic enums? That is, if I create an enum from numbering systems from ICU data, the enum could have different cases, depending on the ICU build/version used. Is that a good idea or bad idea? Right now, I’m just using the string values, which has the same issue, except it won’t hurt typing.
20:54
@ramsey the (main) benefit of enums is at the static analysis level as it makes the code easier to reason about. So dynamic enums probably aren't a sensible thing. You could have one enum type per ICU version....and then have functions that accept multiple types?
function somethingFunWithNumberingSystems(ICUNumbering601|ICUNumbering701 $numbering_type) {}
It's not just the version, though. I think some of the data can change, depending on configuration options to ICU, so that's probably not a good idea
I think I'd have to see your actual use case to comment further....I'm tempted to say just make your own comprehensive enum of all possible numbering systems and rules about which versions of ICU they are allowed to be used on.
I think I'll stick with strings for now
fonts?
Wes
Wes
:D
21:53
I hope this RFC has served to help Juliette recognise the benefits of being involved in the process through direct participation in internals.
Or rather the companies who make money from Wordpress realise they should pay someone to take part in internals.
^
Frankly Automatic should be the ones doing it
22:10
It's a fair point, although effectively paid lobbyists does make me shudder a little, although I guess it may already happen to a degree
twitter rfc bot says wiki.php.net/rfc/stricter_implicit_boolean_coercions just went live
how'd you do that anyway? I assumed there was a command somewhere
nah - just look at history to be able to copy+pasta easily - chat.stackoverflow.com/messages/54700775/history
and then remember how to markdown a link.
ah ha, thank you

« first day (4250 days earlier)      last day (924 days later) »