You are here: Re: factory pattern in php « PHP Programming Language « IT news, forums, messages
Re: factory pattern in php

Posted by Michael G on 10/27/17 11:22

"Michael G" <mike-g@montana.com> wrote in message
news:42e6bfdb$1_2@spool9-west.superfeed.net...
> new $a."(".$paren.")" //this does not work
>

this does work:

new $a($paren);

That seems so non-intuitive to me. Anyway, just not used to using a language
like this. I must say being able to use variables in this way really
increases the flexibility of the language. Not that a person needs to use
syntax like this alot but at least it is available.

On another note, since constructors are simply functions with the same name
as the enclosing class, a typical function could be called like this:

$a = "foo";

$a();

The result is very similar to using pointers to functions.

Mike




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация