Re: Pseudo-objects (methods on arrays, strings, etc.)

From: Date: Tue, 17 Jul 2012 19:20:38 +0000
Subject: Re: Pseudo-objects (methods on arrays, strings, etc.)
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-61376@lists.php.net to get a copy of this message
Hi! > That would be: tokenizer + static analysis (with type inference) + replacing some of the > tokens. > Not a trivial task, but definitely doable. So what would this tool do with this code? $a = getFirstArrayName(); $b = getSecondArrayName(); $$a = $$b; $b[1] = 0; Or this: include 'a.inc'; $a = $b; include 'b.inc'; where a.inc has array $a and b.inc has something like $b[1] = 0; but you have no way of knowing it since by the time you run the tool a.inc and b.inc are not available to it (think config files). -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#61376) next »