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/29/08 11:22

"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:jvbde11ijfrgk5rmjkp5mb9d6k2evg1n80@4ax.com...
> On Tue, 26 Jul 2005 14:43:36 -0600, "Michael G" <mike-g@montana.com>
> wrote:
>
>>>> function create($className) {
>>>> return new $className;
>>>> }
>>>>
>>>> Not sure if it's a better solution though.
>>>>
>>>
>>> That's not a bad idea. It would eliminate the need for an array of
>>> strings.
>>
>>Just a note, some languages would not allow that. That makes me a bit
>>uncomfortable. They would require an explicit open/closed paran at a
>>minimum.
>
> But you're not writing in other languages, you're writing in PHP where
> it's
> valid syntax, so where's the problem?
>

Between my ears!!

Just because the php interpreter doesn't barf doesn't necessarliy mean that
it is defined behavior. I have ran across this before with different
implementations of compilers, undefined behavior that is.

Thanks, 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

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