Re: [PHP-DEV] [RFC] Transform exit() from a language construct into a standard function

2024-05-09 Thread Flávio Heleno
> > Kind regards > Niels > Hi all, Is there a list of other "functions" that are handled as "constants"? -- Atenciosamente, Flávio Heleno

Re: [RFC] OOP API for cURL extension

2024-02-15 Thread Flávio Heleno
ome. > > try { > (new \CurlHandle)->setOpt(YOUR_VOTE, true)->exec(); > } catch (\CurlHandleException $ex) { > assert(false); // Why not?! > } > > -Sara > Although I do not have voting karma, that'd be a +1 from me! -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] Apply strict_types to internal functions

2023-08-30 Thread Flávio Heleno
hen you declare "strict_types" and pass a Stringable instance as the first argument to json_decode, it fails [2]. Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be > of type string, strcls given > [1] https://3v4l.org/TXAUi [2] https://3v4l.org/uEhbM -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] Default values for php.ini environment variables

2023-07-13 Thread Flávio Heleno
; > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] ??= and function calls

2023-07-05 Thread Flávio Heleno
Great catch Ilija! Do you mind sharing how did you stumble upon it? Thank you! On Wed, Jul 5, 2023, 06:31 Dmitry Stogov wrote: > On Wed, Jul 5, 2023 at 1:15 AM Ilija Tovilo > wrote: > > > Hi everyone > > > > I recently discovered some unfortunate behavior of the coalesce > > assignment operat

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

2023-03-01 Thread Flávio Heleno
ss and support > attributes. I plan to propose all of this later as well but that might take > some time. > > > > Regards > > > > Jakub > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > Great addition folks, looking forward to it! If there is anything that I can do to help, please let me know! -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] Official Preprocessor

2023-02-03 Thread Flávio Heleno
On Fri, Feb 3, 2023 at 6:19 AM Olle Härstedt wrote: > 2023-02-02 15:19 GMT+01:00, someniatko : > > Hi Internals > > > > The main gist: > > -- > > > > I suggest to introduce an official type-checker / static analyser / > > preprocessor / transpiler for PHP, somewhat similar to TypeScri

Re: [PHP-DEV] [RFC] [Discussion] Typed class constants

2023-02-03 Thread Flávio Heleno
On Fri, Feb 3, 2023 at 11:34 AM Máté Kocsis wrote: > Hi Alexandru, Mark, > > > > 1. Why is object type not supported? I can't see a real reason and also > > there is no explanation why. > > > > Sorry for this, mentioning object as unsupported was an artifact from the > original version of the RFC

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

2023-01-18 Thread Flávio Heleno
On Wed, Jan 18, 2023 at 4:17 PM Tim Düsterhus wrote: > Hi > > On 1/18/23 18:51, Kamil Tekiela wrote: > > As you said yourself, this refactoring has no practical effect on > > It has no practical effect *yet*. The headers need to be untangled first > before actual optimization can happen. > > Or m

Re: [PHP-DEV] [RFC][Dynamic class constant fetch]

2022-11-04 Thread Flávio Heleno
On Fri, Nov 4, 2022 at 12:08 PM someniatko wrote: > > What's convenient about `Foo::{$bar}` vs `constant(Foo::class . '::' . > > $bar)`? I'm a bit confused by this :| > > > > Is it the few keystrokes added? > > Even if ignoring syntax / convenience bikeshedding, I find it a really > valuable addi

Re: [PHP-DEV] Experimental features

2022-10-05 Thread Flávio Heleno
ns add a significant entry burden and reduce the reach for > users of the product, be it for lack of trust, knowledge or lack of > infrastructure that allows such changes. > > > > Deleu & Juan, Thanks for clearing this up! A product approach could be something interesting to explore. I'm more than happy to join and help anyway I can. -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] Experimental features

2022-10-04 Thread Flávio Heleno
On Tue, Oct 4, 2022, 17:43 David Rodrigues wrote: > I wanted to suggest the possibility of introducing experimental features to > PHP. > > This is an old thread I guess, but I think it's good to reevaluate the > situation from time to time, as other languages already do this to some > extent and

Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize()

2021-12-09 Thread Flávio Heleno
On Thu, Dec 9, 2021, 18:56 Christoph M. Becker wrote: > On 09.12.2021 at 20:59, Flávio Heleno wrote: > > > On Thu, Dec 9, 2021 at 4:46 PM Nikita Popov > wrote: > > > >> On Wed, Dec 8, 2021 at 12:41 PM Christoph M. Becker > >> wrote: > >> >

Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize()

2021-12-09 Thread Flávio Heleno
gt; > > [1] <https://github.com/php/php-src/pull/7711> > > > > Assuming no licensing concerns, bundling libavifinfo sounds reasonable. The > library is small, our avif functionality is incomplete without it, and we > can't expect this to be available as a system library at this time. > > Regards, > Nikita > Although I'm not a core contributor, my 2c is that even with libavifinfo bundled, a configuration option is very welcome, the same way we have for png, jpeg, xpm and webp. As *cmb* said, thanks for your and your colleague's work! -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] [RFC] $this return type

2021-09-09 Thread Flávio Heleno
having "$this" (or variations of it) as a valid return type as opposed to simply using "self" is to ensure that the underlying code is actually doing a "return $this" rather than returning any other valid "self" instance (such as "return new self();")? -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] [RFC] Deprecate partially supported callables

2021-09-02 Thread Flávio Heleno
unction", "Foo::method", ["Foo", "method"] and [new Foo, > "method"] style callables are unaffected by this change. > > Regards, > Nikita > With this, PHP walks another step towards a much needed cleanup. >From me this is a more than welcome change. -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] [RFC] Deprecate dynamic properties

2021-08-25 Thread Flávio Heleno
de, more frequently than not is that legacy code is unlikely to run on the latest version of PHP, thus I'm not entirely sure if that's a super strong argument against it, but I may be missing something. -- Atenciosamente, Flávio Heleno

Re: [PHP-DEV] Unwrap reference after foreach

2021-08-13 Thread Flávio Heleno
On Fri, Aug 13, 2021 at 11:20 AM Claude Pache wrote: > > > Le 13 août 2021 à 15:28, Nikita Popov a écrit : > > > > Hi internals, > > > > I'd like to address a common footgun when using foreach by reference: > > https://wiki.php.net/rfc/foreach_unwrap_ref > > > > This addresses the issue describe