Re: Code References
| From: | Sterling Hughes | Date: | Mon, 19 May 2003 13:23:42 +0000 |
| Subject: | Re: Code References | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1703@lists.php.net to get a copy of this message | ||
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