On Jun 10, 2018 10:46 PM, "Hoffman, Zachary Robert" wrote:
>The existence of anything that internally relies on `get_defined_vars()` is a
>blocker for applying further optimisations to the engine (think stack frames),
>which is probably why Dmitry suggested its removal.
I did not know it was an
On 11 June 2018 at 07:14, Hoffman, Zachary Robert wrote:
>
> However, even if those 4 values end up being stored in a structure, I
> don't want to manipulate that structure within that class method itself, I
> want to perform computations with local variables. If I have to separately
> store thos
On Sun, 2018-06-10 at 23:49 +0100, Rowan Collins wrote:
> On 10/06/2018 19:41, Hoffman, Zachary Robert wrote:
> > Deprecating compact() would hurt workflows where you use the same
> > variable names
> > several times in different contexts, even though they are only
> > declared locally
> > for the
On 10/06/2018 19:41, Hoffman, Zachary Robert wrote:
Deprecating compact() would hurt workflows where you use the same variable names
several times in different contexts, even though they are only declared locally
for the purposes of compact() itself.
I am not convinced that building logic aroun
>The existence of anything that internally relies on `get_defined_vars()` is a
>blocker for applying further optimisations to the engine (think stack frames),
>which is probably why Dmitry suggested its removal.
I did not know it was an optimization issue. I suppose I could substitute a
userland
= (new A())->c();
>
> foreach (A::b() as $b) {
> echo $a->a($b) . PHP_EOL;
> }
>
> The alternative would be manipulating array elements directly, like this:
>
> public function c()
> {
> $e['d'] = $this->d();
> $e['a'] = pow($
rray elements directly, like this:
public function c()
{
$e['d'] = $this->d();
$e['a'] = pow($e['d'], $e['d'] + 1);
$e['c'] = $e['a'] ^ 0b1100;
$e['b'] = $e['a'] - $e['d'];
return new
>
> Hi Gabriel,
>
>> compact(), extract(), parse_str() (with 1 argument) and
>> get_defined_vars() are bad functions, because they access local variables
>> indirectly.
>>
>> They might be considered to be removed in the next major PHP version,
>> despite of this fix.
>>
>>
>> Thanks. Dmitry.
>>
>>
Am 09.06.2018 um 12:03 schrieb Dmitry Stogov:
> They might be considered to be removed in the next major PHP version, despite
> of this fix.
+1
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
.
From: Gabriel Caruso
Sent: Wednesday, June 6, 2018 3:58:24 PM
To: PHP Internals
Subject: [PHP-DEV] [VOTE] Make compact function reports undefined passed
variables
Hello there.
I'd like to announce that I've opened the RFC for voting until 06/18.
https://wiki.php.net/rfc/compa
Hello there.
I'd like to announce that I've opened the RFC for voting until 06/18.
https://wiki.php.net/rfc/compact
Thanks.
--
Gabriel Caruso
11 matches
Mail list logo