Re: [RFC] Import of variables

From: Date: Sun, 09 Aug 2020 22:27:28 +0000
Subject: Re: [RFC] Import of variables
Groups: php.internals 
Request: Send a blank email to internals+get-111410@lists.php.net to get a copy of this message
-- Manuel Canga ---- En dom, 09 ago 2020 23:41:12 +0200 Rowan Tommins <rowan.collins@gmail..com> escribió ---- > On 9 August 2020 22:35:11 BST, Manuel Canga <manuel.canga@trasweb.net> wrote: > > Hi Manuel, > > I think there's a misunderstanding. My comments weren't really about how to > implement your proposal, they were about the features the language already has, which in my view > make this new feature unnecessary. > > Regards, > > Hi, Rowan. I'm sorry. I'm Spanish and my English is not very good. :( A new example: ``` $miVariableEsSuperBuena='5'; include __DIR__.'/test.php'; ``` # test.php ``` echo miVariableEsSuperBuena; echo empty($miVariableEsSuperbuena); ``` What is the result ? ...... -------- ---------------- ----------------- -------------------- Result is 51( the second identifier is wrong ). However, with: ``` $miVariableEsSuperBuena='5'; include __DIR__.'/test.php'; # test.php use vars miVariableEsSuperBuena; echo miVariableEsSuperBuena; echo empty($miVariableEsSuperbuena); //editor could mark this variable as not initialized. ``` . Regards

« previous php.internals (#111410) next »