> On 17 Mar 2023, at 05:33, Larry Garfield wrote:
>
> On Thu, Mar 16, 2023, at 4:14 AM, Rowan Tommins wrote:
>>> On 15/03/2023 21:12, Dan Ackroyd wrote:
>>> Would it be desirable to split those two things into two separate
>>> RFCs, by having the first RFC not have native syntax support, but
>
On 16/03/2023 22:14, Larry Garfield wrote:
Wouldn't the functionality described boil down to essentially just
materializing into a few extra lines in the constructor? At least to my
ignorant non-engine brain it seems straightforward to have this:
$a = 1;
$b = 2;
$c = 3;
$o = new class ($a, $
On Thu, Mar 16, 2023, at 4:14 AM, Rowan Tommins wrote:
> On 15/03/2023 21:12, Dan Ackroyd wrote:
>> Would it be desirable to split those two things into two separate
>> RFCs, by having the first RFC not have native syntax support, but
>> instead another static method on Closure? e.g. something like
On Thu, Mar 16, 2023, at 5:06 PM, Rowan Tommins wrote:
> On 16/03/2023 17:59, Nicolas Grekas wrote:
>> We could define the "use" as declaring + setting the properties before
>> the constructor is called, if any.
>> But I'm also fine making both constructs conflict: when there is a
>> constructor,
On 16/03/2023 17:59, Nicolas Grekas wrote:
We could define the "use" as declaring + setting the properties before
the constructor is called, if any.
But I'm also fine making both constructs conflict: when there is a
constructor, the boilerplate saved by the "use" becomes really low.
No strong o
> > To overcome the issues spotted in the thread, what about doing some sort
> > of CPP instead of autocapture?
> >
> > new class (...$arguments) use ($outer) extends Foo {
> > public function getIt() {
> > return $this->outer;
> > }
> > }
> >
> > This would be the equivalent of thi
On Thu, Mar 16, 2023, at 9:40 AM, Hans Henrik Bergan wrote:
> Something like
> ```
> $data = compile_time_routine(function() {
> return json_decode(file_get_contents("large.json"), true);
> });
> ```
> being equivalent at runtime to
> ```
> $data = array(...whatever json_decode returned...);
>
Something like
```
$data = compile_time_routine(function() {
return json_decode(file_get_contents("large.json"), true);
});
```
being equivalent at runtime to
```
$data = array(...whatever json_decode returned...);
```
and
```
echo "opcache compiled at " . compile_time_routine(function(){return
The PHP development team announces the immediate availability of PHP
8.2.4. This is a bugfix release.
All PHP 8.2 users are encouraged to upgrade to this version.
For source downloads of PHP 8.2.4 please visit our downloads page.
Windows binaries can be found on the PHP for Windows site.
The list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
The PHP development team announces the immediate availability of PHP
8.1.17.
This is a bugfix release.
All PHP 8.1 users are encouraged to upgrade to this version.
For source downloads of PHP 8.1.17 please visit our downloads page. Windows
binaries
Hi Alexandru
>> https://wiki.php.net/rfc/arbitrary_static_variable_initializers
>> https://externals.io/message/118976
>>
>> There haven't been many responses, so I'd like to put this to a vote
>> early next week.
>>
> Only a small thing in the example for
> "ReflectionFunction::getStaticVariable
Hi Tim
> Using Alain's example of static variables that depend on each other. For
> the following:
>
> function foo() {
>static $a = 0;
>static $b = $a + 1;
> }
>
> The value of '$a' is known at compile time. Is the value of '$b' also
> known at compile time? It might make sense to include
On Thu, Mar 16, 2023 at 10:14 AM Rowan Tommins wrote:
>
> On 15/03/2023 21:12, Dan Ackroyd wrote:
> > Would it be desirable to split those two things into two separate
> > RFCs, by having the first RFC not have native syntax support, but
> > instead another static method on Closure? e.g. something
On Thu, 16 Mar 2023 at 09:28, Nicolas Grekas
wrote:
>
> To overcome the issues spotted in the thread, what about doing some sort
> of CPP instead of autocapture?
>
> new class (...$arguments) use ($outer) extends Foo {
> public function getIt() {
> return $this->outer;
> }
> }
>
>
Hi Rowan,
I have been pondering for a while how to improve the anonymous class
> syntax to allow "capturing" of values from the outer scope, and came up
> with the idea of a special variable marker for "lexically captured
> variable" - instead of $foo, you would write $!foo or $^foo (I quite
> lik
On 15/03/2023 21:12, Dan Ackroyd wrote:
Would it be desirable to split those two things into two separate
RFCs, by having the first RFC not have native syntax support, but
instead another static method on Closure? e.g. something like:
Closure::partial($callable, array $position_params, array
$na
16 matches
Mail list logo