Reply to Re: Execute code in global scope

Your name:

Reply:


Posted by Tommy Gildseth on 02/25/06 17:23

Chung Leong wrote:
>
> function bobo_the_clown($code) {
> // map in global variables
> $global_vars = array_keys($GLOBALS);
> foreach($global_vars as $var) {
> if($var !== 'GLOBALS') {
> $$var =& $GLOBALS[$var];
> }
> }

extract($GLOBALS); may seem like a better choice.
I did think about suggesting that, but though that it would make the
script to inefficient to be usefull.


--
Tommy Gildseth
http://design.twobarks.com/

[Back to original 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

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