Re: note 8479 added to Classes and Objects
| From: | J. M. Castagnetto | Date: | Fri, 15 Sep 2000 00:09:02 +0000 |
| Subject: | Re: note 8479 added to Classes and Objects | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4994@lists.php.net to get a copy of this message | ||
Your logic is incorrect, because what you are trying
to do makes no syntactic sense. The string is not
magically parsed differently because there is a "()"
there. If you want the parser to execute code in a
string, usa eval or something along those lines.
Note has been deleted.
--- llam@thinkage.ca wrote:
> Using php 4.
> the 'new' operator works with variable class names
> only if there are no arguments in the variable:
>
> eg.
> $a = "myclass";
> $b = "myclass(arg1)";
> $c = new $a; // ok
> $d = new $a(arg1); // ok
> $e = new $b; // fail: considers 'myclass(arg1)' as
> the class name.
>
> http://www.php.net/manual/language.oop.php
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/