Re: Code References
| From: | Wez Furlong | Date: | Mon, 19 May 2003 14:55:28 +0000 |
| Subject: | Re: Code References | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1705@lists.php.net to get a copy of this message | ||
use perl;
This isn't exactly readable...
--Wez.
On Mon, 19 May 2003, Sterling Hughes wrote:
> On Mon, 2003-05-19 at 10:47, George Schlossnagle wrote:
> > Excuse my ignorance, but how does this differ from the features offered
> > by create_function? (Other than having nicer aesthetics.)
> >
>
> create_function is runtime for one thing, this would be compile time
> (code reference, doesn't need to be relookedup). And then of course
> there are aesthetics, its incredibly ugly to do anything remotely
> complex with create_function. Also you would be able to do:
>
> <%
> function output_header($header) {
> $header('Hello World');
> }
>
> output_header(function ($title) {
> %>
> <html>
> <head>
> <title>$title</title>
> </head>
> <body>
> <%
> }
> %>
>
> -Sterling
>
> --
> "The three most dangerous things in the world are a programmer
> with a soldering iron, a hardware type with a program patch and
> a user with an idea."
> - Unknown
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>