RE: [PHP] Calling function on the same line?

From: Date: Sat, 28 Mar 2009 12:51:45 +0000
Subject: RE: [PHP] Calling function on the same line?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-290791@lists.php.net to get a copy of this message
I miss the utility to do stuff like that ... seriously ... but in any case: <?php echo ($f = 'str_replace') ? $f("a", "b", "aaa") : null; ?> where echo is optional. Regards > Date: Sat, 28 Mar 2009 15:26:18 +0300 > From: danondaniel@gmail.com > To: php-general@lists.php.net > Subject: [PHP] Calling function on the same line? > > Is there any way to do something like: > > <?php > ("str_replace")("a", "b", "aaa"); > ?> > > ? > > One of the problems that I must keep "str_replace" on the same line...The > only solution I see is call_user_func, but I would like to know if you guys > might have a clue =] > Tried looking on the manual, sadly didn't found anything > > Thanks, Daniel _________________________________________________________________ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/

« previous php.general (#290791) next »