You are here: Re: can I use create_function to create enclosures? « PHP Programming Language « IT news, forums, messages
Re: can I use create_function to create enclosures?

Posted by gosha bine on 04/17/07 11:29

On 16.04.2007 18:47 lawrence k wrote:
>
> You misunderstood the question. I was asking "Does PHP support
> closures?" That was the question. I like using closures in languages
> such as Ruby and Javascript. I was wondering if there was any way to
> do so in PHP. I'm assuming the answer is no.
>
>

hi there

php doesn't support closures directly, because function declarations are
processed at compile time and create_function() deals only with strings.

However, with some hacking it's possible to emulate closures (or,
rather, partial application) using eval or create_function. See e.g.
http://www.tagarga.com/blok/on/061218


--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

 

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

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