RE: [PHP-DEV] __clone() implementation
| From: | Steph | Date: | Mon, 02 Feb 2004 22:42:30 +0000 |
| Subject: | RE: [PHP-DEV] __clone() implementation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7496@lists.php.net to get a copy of this message | ||
> I just had a look at zend_compile.c - it seems as if the variable name
> $that was mandantory:
>
> [...]
> || strcmp(CG(active_op_array)->arg_info[0].name, "that")!=0)) {
> zend_error(E_COMPILE_ERROR, "The clone method
> must be declared as __clone($that)");
> [...]
>
> Why shouldn't I be able to name it as I want, e.g. $clone? Don't
> understand the reason for that...
$that has to be at least as userfriendly as $this - and easier to maintain
than having it be more flexible would.