RE: Calling function on the same line?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx
> To: php-general@xxxxxxxxxxxxx
> Subject:  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/

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux