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 Willem Bogaerts on 04/17/07 07:39

> Anyone know if PHP supports enclosures, like Javascript or Ruby? I've
> always assumed PHP lacked these. If I create a function with object
> instances, will the instances retain their state if the function
> definition is stored in a variable?

In the object oriented sense, yes. You can pass a function even if it is
a method of an instance. These functions are used in sorting, for
example (usort function). I never used pure lambda functions as I once
did in lisp, because I mainly write object-oriented code now.

See also the callback type in the documentation:
http://nl3.php.net/callback

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/

 

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

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