Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-11 Thread Rowan Tommins
mposer.org/doc/04-schema.md#psr-4): > Namespace prefixes must end in \\ to avoid conflicts between similar > prefixes. For example Foo would match classes in the FooBar namespace so the > trailing backslashes solve the problem: Foo\\ and FooBar\\ are distinct. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-11 Thread Rowan Tommins
y rather inefficient. Perhaps the "register" functions should take an optional list of namespace prefixes, so that the core implementation can do the string comparison, and only despatch to the userland code if the requested class/function name matches. Thanks again for working on this!

Re: [PHP-DEV] Future stability of PHP?

2023-04-10 Thread Rowan Tommins
quirks" & "limited-quirks", JS's "use strict" - but it doesn't scale, so it's never going to replace the genuinely hard question of how to improve a language for new code, while limiting pain for existing code. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Property Hooks Discussion

2023-03-31 Thread Rowan Tommins
aft" status rather than "In Discussion", so hasn't been announced yet, and may not be ready for discussion. I'll leave it up to Ilija and Larry to say whether your question is something they know the answer to, or if it's a "known unknown". Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] Broken Wiki Registraiton (was: [IDEA] allow extending enum)

2023-03-30 Thread Rowan Tommins
Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] Mailing List Preferences (was: Broken Wiki Registraiton)

2023-03-30 Thread Rowan Tommins
ads). But on the other hand, you can't predict how your messages will interact with someone else's UI and workflow. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] [IDEA] allow extending enum

2023-03-29 Thread Rowan Tommins
t is? If it cares that it can turn it into an integer, it can just request an integer directly, or an object implementing an appropriate interface: interface ErrorValueInterface { public function getCode(): int; } >From the description given, it seems like enums are sinmply the wrong tool for the job. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] [IDEA] allow extending enum

2023-03-29 Thread Rowan Tommins
break; default: // assert($code instanceof StandardErrorCode); parent::handle($code); break; } } } Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] [IDEA] allow extending enum

2023-03-29 Thread Rowan Tommins
o make clear that this is *not* a sub-type relationship - perhaps something like "expands", "allows", or "encompasses". Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] First-class callable partial application

2023-03-17 Thread Rowan Tommins
something like: $size = Closure::apply( Closure::pipe( Closure::partial(amap(...), chr(...)), Closure::partial( implode (...), ','), amap(...) ), $arr ); Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-16 Thread Rowan Tommins
will complain that you have two methods named "__construct" Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-16 Thread Rowan Tommins
tionality can always be added in later if someone comes up with a clean implementation and a good use case. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-16 Thread Rowan Tommins
g $name) { $this->counter = $counter; $this->name = $name; } } Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] First-class callable partial application

2023-03-16 Thread Rowan Tommins
y_map($foo, $array); $filterFoo = fn($array) => array_filter($array, $foo); Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-15 Thread Rowan Tommins
e at all, it will end up as a shorthand for that constructor example: declaring normal properties, and populating them as the instance is initialised. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-14 Thread Rowan Tommins
hing, just as $this->foo or self::$foo doesn't mean anything outside a class. In fact, it could be spelled capture::$foo or $scope->foo rather than just using new punctuation, if we wanted to encourage that analogy. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Developm

Re: [PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-14 Thread Rowan Tommins
xible than they are. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] Brainstorming idea: inline syntax for lexical (captured) variables

2023-03-14 Thread Rowan Tommins
oughts into a GitHub Gist here: https://gist.github.com/IMSoP/4157af05c79b3df4c4853f5a58766341 I'd be interested to hear anyone's thoughts - is this a promising idea to explore, or have I gone completely off the rails? Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] First-class callable partial application

2023-03-14 Thread Rowan Tommins
, '.'); $priceFormatter = number_format(..., decimals: 2, decimal_separator: ',', thousands_separator: '.'); Arguably the named param version is more explicit, but in some cases it's significantly longer than manually defining a closure, whereas fully positional PFA is always shorter. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] First-class callable partial application

2023-03-14 Thread Rowan Tommins
ger = is_subclass_of(?, LoggerInterface::class, false); I'm sure I could look through Laravel's documentation, or Symfony's, and find examples there too. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] First-class callable partial application

2023-03-13 Thread Rowan Tommins
o put you off exploring this idea, though, so feel free to take this all with as many pinches of salt as you want. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] First-class callable partial application

2023-03-13 Thread Rowan Tommins
of those features where "the devil is in the details", and a simpler implementation is possible, but may not be desirable. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] RFC Idea - json_validate() validate schema

2023-03-03 Thread Rowan Tommins
On 3 March 2023 16:30:26 GMT, Larry Garfield wrote: >Class constants FTW. s/Class constants/enum/ :P -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] RFC Idea - json_validate() validate schema

2023-03-02 Thread Rowan Tommins
ported versions, so that code needing a particular version could check for support directly, rather than having to attempt and catch an exception? I guess in Larry's suggestion, that use case would be filled by class_exists('JsonSchema_2026_10") Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] RFC Idea - json_validate() validate schema

2023-03-02 Thread Rowan Tommins
his case, but may be worth considering. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] [RFC] Working With Substrings

2023-02-14 Thread Rowan Tommins
On 15 February 2023 05:18:50 GMT, Rowan Tommins wrote: >My instinct was that it could just be a built-in class, with an internal >pointer to a zend_string that's completely invisible to userland. Something >like how the SimpleXML and DOM objects just point into a libxml parse result.

Re: [PHP-DEV] [RFC] Working With Substrings

2023-02-14 Thread Rowan Tommins
On 15 February 2023 02:35:42 GMT, Thomas Hruska wrote: >On 2/14/2023 2:02 PM, Rowan Tommins wrote: >I thought about that but didn't know how well it would be received nor, >perhaps more importantly, the direction it should take (i.e. a formal Zend >type in the engine, extending

Re: [PHP-DEV] [RFC] Working With Substrings

2023-02-14 Thread Rowan Tommins
cover at least some of these use cases. C#, in particular, had a lot of very smart people paid to design it, able to learn from mistakes Java had already made. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] 'Uninitialized' creates a lot of cluttering

2023-02-12 Thread Rowan Tommins
l is indeed a valid value; but so is 0, and -1, and so on. Why should the language assume that one default, among all the possibilities, if you don't specify any? Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] How to deal with bugs in vendored libraries?

2023-02-09 Thread Rowan Tommins
b.com/derickr/timelib/pull/141#issuecomment-1386800720 > Right, I missed that amongst the other comments. Which, again, is why I was prompting you to clearly summarise the rationale for the change in one place, to clear up any misunderstandings. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] RFC proposal: values getter in BackedEnum

2023-02-09 Thread Rowan Tommins
mes from my general opinion of backed enums - to me, the opaque case object is primary, and the "value" is just an arbitrary piece of data attached. I would have preferred to be able to attach any number of such properties, e.g. Options::verbose->longArgumentName, Options::verbose->shortArgumentName. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] How to deal with bugs in vendored libraries?

2023-02-09 Thread Rowan Tommins
imes, technical violations of a spec are necessary for the practical realities of the situation. I think you've answered this question in the PR thread, but I'm trying to get the explanation all in one place, because you've mentioned different details at different times. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] How to deal with bugs in vendored libraries?

2023-02-09 Thread Rowan Tommins
c) The code you removed is *pointless in this particular case* because of a combination of the C99 spec and other factors (but might be reasonable in other circumstances)? Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] RFC proposal: values getter in BackedEnum

2023-02-09 Thread Rowan Tommins
w.com/a/71235974/157957], you can get the case name the same way, and use different arguments to array_column to get combinations like a look up table from value to name: $nameToValue = array_column(BackedEnum::cases(), 'name', 'value'); Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] 'Uninitialized' creates a lot of cluttering

2023-02-08 Thread Rowan Tommins
gotten. Now that we have the Uninitialized state, and have deprecated dynamic properties, this could mostly be reduced to two: has a current valid value, or Uninitialized. But the details of what would need to change and when are the subject for a future discussion. Regards, -- Rowan Tommins [IM

Re: [PHP-DEV] RFC Proposal - Types for Inline Variables

2023-02-08 Thread Rowan Tommins
erence, it still matches array, as required by $mixed_list // but do we also still know that it matches array? It's all probably doable, but I think it's the other way around from your initial statement: working out how to cache type checks would be a pre-requisite for implementing local variable types. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] RFC Proposal - Types for Inline Variables

2023-02-07 Thread Rowan Tommins
rly a comment as far as the language itself is concerned, so there is no expectation when reading it that it will have a meaning to plain PHP. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] RFC Proposal - Types for Inline Variables

2023-02-07 Thread Rowan Tommins
more efficient way, but it's not going to be a simple patch. That's why including an official static analyser is tempting, but it's not obvious where that would fit in the project and ecosystem (see the recent thread on that topic). Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP R

Re: [PHP-DEV] Official Preprocessor

2023-02-04 Thread Rowan Tommins
book, but didn't gain traction outside it; I wish Saif luck with Ara, but I'm not holding my breath. [1] Yes, there's now a "class" keyword, but it's just syntactic sugar; the fundamental inheritance model still consists of prototype chains. -- Rowan Tommins [IMSoP] -- PHP Internals

Re: [PHP-DEV] Official Preprocessor

2023-02-03 Thread Rowan Tommins
ped with php-src, PECL is written in PHP, and there have even been suggestions that rewriting some included functions in PHP would be a good long-term goal. The far larger concerns are governance, resources, and release cycles. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Dev

Re: [PHP-DEV] Official Preprocessor

2023-02-02 Thread Rowan Tommins
bly end up with a lot of such cases - all the features that the Hack team decided to remove - leading to poor performance and confusing developer experience. I don't have a conclusion to this e-mail, I just thought I'd throw out these thoughts. Regards, -- Rowan Tommins [IMSoP] -- PHP Inter

Re: [PHP-DEV] [RFC] Pass Scope to Magic Accessors

2023-01-24 Thread Rowan Tommins
mind, parent::__get('name') is just a regular method call, so why does it change the meaning of "calling scope"? Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] RFC: rules for #include directives

2023-01-18 Thread Rowan Tommins
better naming, or better documentation of existing conventions. - Perhaps it is a justification added when the include was first added. If so, put it in the commit message and PR summary. I'm not the right person to have opinions on the rest of this discussion, but I can certainly understand the argument

Re: [PHP-DEV] [RFC] Path to Saner Increment/Decrement operators

2023-01-18 Thread Rowan Tommins
to add support for string increments to the += operator, and presumably also the + operator to avoid a different inconsistency. That is, make 'a' + 5 === 'f'. I don't think that's even worth considering, but it's the only other way to achieve consistency.) Regards, -- Rowan Tommins [IMSoP] --

Re: [PHP-DEV] [RFC] Path to Saner Increment/Decrement operators

2023-01-17 Thread Rowan Tommins
and string_dec("0") could simply throw an Error. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Methods which auto-return the class instance

2022-12-24 Thread Rowan Tommins
lf or :static which currently fails to return would be a runtime error, but changing that error into an implicit return $this could be very dangerous. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Unicode Text Processing

2022-12-21 Thread Rowan Tommins
he parameters a union "TextCollator|string $collation", implying this: // object is supported directly $a->compareWith($b, (new TextCollator('en'))->setCaseInsensitive()); // so are strings if you already have one for some reason $a->compareWith($b, 'en-u-ks-level1'); Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] [RFC] Unicode Text Processing

2022-12-16 Thread Rowan Tommins
ng this complexity to users in a class that otherwise holds their hand at every step of the way? I think the parameters should always be a user-friendly collation/locale object, with the ICU strings an optional way for experts to create such an object. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Unicode Text Processing

2022-12-16 Thread Rowan Tommins
if people started using this for all the text on an application, I can see longer strings becoming a more common use case. Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] [RFC] Unicode Text Processing

2022-12-15 Thread Rowan Tommins
really like to see, for instance, is a grapheme-aware version of mb_strcut, to solve tasks like: "encode this abstract Unicode string as UTF-16BE, truncated to at most 200 bytes, without breaking apart any grapheme clusters". Thanks again for getting the ball rolling, and I look fo

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-13 Thread Rowan Tommins
n possible solutions, not just arguing in circles. It's always been a source of confusion to me that JS has both, and the syntax for working them seems far from elegant (unless things have improved, and you no longer need to use typeof to detect undefined?); but maybe I'm looking at it wrong. Re

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-13 Thread Rowan Tommins
orm(); } elseif ( trim($search) === '' ) {     show_validation_error(); } else {     perform_search($search); } For cases where you don't need that distinction, Laravel, Symfony, and CakePHP all allow a default to be passed as the second parameter. Regards, -- Rowan Tommins [IMSoP] -- PHP

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-13 Thread Rowan Tommins
the severity of one specific message. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-13 Thread Rowan Tommins
effectively added the same notice to it as PHP has to built-in functions, to track down where else this might be causing problems without escalating to an error immediately. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-12 Thread Rowan Tommins
ad to a key being unexpectedly missing. I think this is a general approach that should be more explicitly embraced: introduce convenient syntax for valid use cases, while making accidents obvious. Regards, Hi Dan, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing Li

Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly

2022-11-21 Thread Rowan Tommins
on this RFC as it is, so if some edge cases can reasonably be defined as forbidden, we're less likely to end up regretting some detail. Then if a good use case is identified, there can be a follow-up RFC, either within this release cycle, or in a future release. Regards, -- Rowan Tommins

Re: [PHP-DEV] [RFC] [Discussion] Readonly class amendments

2022-11-15 Thread Rowan Tommins
is RFC will let you do, and some that it *won't* let you do, even for things that seem obvious to you, because they might not be obvious to everyone. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [Discussion] Readonly class amendments

2022-11-15 Thread Rowan Tommins
that invoking a separate method like "setSomeProperty($blah)" from __clone() is allowed, or that it isn't? Perhaps a couple of extra examples could be added to this section demonstrating what would and wouldn't be allowed? Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] ARRAY_UNIQUE_IDENTICAL option

2022-11-04 Thread Rowan Tommins
ed by a 1, but they are certainly distinct values. I'd much rather get an error that made me check the manual and find a flag than have one of them silently discarded. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Destructuring Coalesce

2022-11-01 Thread Rowan Tommins
reasonable case for the choice of semantics, and I don't really have a strong reason *not* to allow it. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Microseconds to error log

2022-10-31 Thread Rowan Tommins
On 31/10/2022 10:16, Craig Francis wrote: On Sun, 30 Oct 2022 at 17:42, Rowan Tommins wrote: In case of any confusion, I think this should be configurable as "include microseconds: on / off", not configurable as "enter date format". Any reason it can't be c

Re: [PHP-DEV] Microseconds to error log

2022-10-30 Thread Rowan Tommins
conds: on / off", not configurable as "enter date format". Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Microseconds to error log

2022-10-21 Thread Rowan Tommins
a user point of view I agree the feature would be useful. It would definitely need to be behind an ini setting, though, to avoid existing log parsers failing unexpectedly on the new format. Regards, Hi Mikhail, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailin

Re: [PHP-DEV] Compact can't resolve outer scoped variables using short closures

2022-10-20 Thread Rowan Tommins
into: fn() => [ 'dummy' => $dummy ] which turns into: function() use($dummy) { return [ 'dummy' => $dummy ]; } Yes, that is what I meant by "it would be possible for the compiler to special-case this scenario"; I explained why I think that would be a bad idea, and suggested an

Re: [PHP-DEV] Compact can't resolve outer scoped variables using short closures

2022-10-20 Thread Rowan Tommins
uld be named to be meaningful in the current scope, not somewhere they're coming from or going to, but a dedicated syntax would at least allow that flexibility. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Experimental features

2022-10-11 Thread Rowan Tommins
s to these questions, but it would be helpful to understand people's gut feeling on them, to get a better idea of what people are imagining. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Experimental features

2022-10-08 Thread Rowan Tommins
mpatible, but then make users wait before using it in production. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Experimental features

2022-10-06 Thread Rowan Tommins
;123u" to say "u123" instead? Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Sanitize filters

2022-10-06 Thread Rowan Tommins
't support internationalized addresses in their Unicode form, though, so it won't do for FILTER_FLAG_EMAIL_UNICODE. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Experimental features

2022-10-06 Thread Rowan Tommins
em that needs to be solved and there are multiple solutions: GitHub issues, corporate/public messengers (Slack?) or the internals mailing list. There are certainly ways to approach it; I'm just agreeing with a previous commenter that this would need to be an explicit part of any proposal, n

Re: [PHP-DEV] Sanitize filters

2022-10-06 Thread Rowan Tommins
entation b) There is a better implementation out there, which we should start using in ext/filter right now My gut feel is that (a) is true, and there is no point considering what a new function would be called, because we don't know how to implement it. Regards, -- Rowan Tommins [IMSoP] -- PHP Inter

Re: [PHP-DEV] Union type casts

2022-10-05 Thread Rowan Tommins
ets complicated quickly. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Experimental features

2022-10-05 Thread Rowan Tommins
ith a shortage of experts, so I'm wary of adding more complexity. I also agree with the previous comment that this would need to be coupled with some way of monitoring the results - imagine we released an experimental feature 3 months ago, what do we do exactly to find out if it needs changing? Regards, -- Rowan Tommins [IMSoP]

Re: [PHP-DEV] Sanitize filters

2022-10-04 Thread Rowan Tommins
implementations which would all be equally "valid" according to some use case or opinion, so it's a bit of a quagmire. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Sanitize filters

2022-10-03 Thread Rowan Tommins
e whole of ext/filter and making a whole bunch of new mistakes. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] One-line heredoc for better syntax highlightning

2022-09-20 Thread Rowan Tommins
time; if it exactly matches the delimiter, stop; else, add the line to the file buffer. No actual parsing is required. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] One-line heredoc for better syntax highlightning

2022-09-20 Thread Rowan Tommins
licit in the sense that it is syntax dedicated for that purpose, in a standard format. If I write <<way to know if "foo" is the name of a language I'm hoping to label, or just a token which I know doesn't appear in my content; if I write /** @lang foo */"hello", there's no am

Re: [PHP-DEV] One-line heredoc for better syntax highlightning

2022-09-19 Thread Rowan Tommins
On 19 September 2022 15:24:26 BST, "Olle Härstedt" wrote: >Hi internals! > >Some editors can guess the domain-specific language inside heredoc, e.g. if >you do > >$query = <