Re: I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
| From: | Daniel Brown | Date: | Sat, 11 Jul 2009 18:01:41 +0000 |
| Subject: | Re: I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295234@lists.php.net to get a copy of this message | ||
On Sat, Jul 11, 2009 at 13:45, Eddie Drapkin<oorza2k5@gmail.com> wrote:
>
> If that's true, then we've found an error reporting bug! I've never
> seen an error/warning raised, even with my usual
> "error_reporting(E_ALL | E_STRICT | E_DEPRACATED)"! The warning is
> raised here, though:
> $foo = $bar[hello];
>
> but not here:
> $foo = "$bar[hello]"
No, we're crossing subjects here, actually. The error would be
raised in something such as the following:
<?php
$bar['hello'] = 'World!';
$bar['world'] = 'Hello,';
$foo = <<<EOT
$bar['world'] $bar['hello']
EOT;
echo $foo."\n";
?>
> Sorry if I sound like an ass, just trying to defend myself from having
> to go change several thousand array items referenced from doublequotes
> / HEREDOC.
You don't sound like an ass at all (quite the contrary, actually),
and not changing them certainly isn't the end of the world.
--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig