Re: Nowdocs revised
| From: | Richard Quadling | Date: | Thu, 16 Aug 2007 08:22:23 +0000 |
| Subject: | Re: Nowdocs revised | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31619@lists.php.net to get a copy of this message | ||
On 16/08/07, Gwynne Raskind <gwynne@wanderingknights.org> wrote:
> On Aug 15, 2007, at 2:00 PM, Christopher Jones wrote:
> > Did you get any further with merging this? It would help users of
> > the XQuery language.
> >
> > If I understand your intent, I would be able to change the code
> > fragment
> > below to use a nowdoc, and not have to escape the XQuery $i variables.
> >
> > Chris
> >
> >
> > <?php
> >
> > $c = oci_connect("hr", "hrpwd", "localhost/orcl");
> >
> > $xq = <<<END
> > select column_value
> > from xmltable('for \$i in ora:view("locations") return \$i')
> > END;
> >
> > $s = oci_parse($c, $xq);
> > oci_execute($s);
> > while ($row = oci_fetch_row($s))
> > var_dump($row);
> > ?>
>
> I didn't get any further, no :(. The decision of whether to merge the
> nowdocs patch is out of my hands now, since I don't have source
> karma. However, since the main thing standing in the way of its
> implementation was concern over the usefulness, your comment is very
> helpful, and I'd like to open the topic for discussion again on the
> list, if no one out there has any objection :)
Being able to code templates within PHP rather than as an external
file without any escaping or variable expansion _is_ useful.
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"