hi... im a newbie... using function_exists() is very very useful...
is it true that print() is a function? if yes, then proceed to this...
with this code:
the output would be:
any function test works fine with it except for print()...
with this code:
the result is empty... i know that it is useless testing print()... but is it really the exact explanation behind why print() does not work with function_exists() (that it is useless)?
if it so, then why function_exists() works when function_exists itself is used as a parameter (see the first example)? well, function_exists is also useless because in the first place you cannot invoke it if it does not exist right?
i just couldn't see which is which...
1) when using function_exists as a parameter works fine is reasonable, then print should work fine too, because it is also a function. otherwise, this is a lack of codes within the function_exists().
2) on the other hand, when using print as a paramater doesn't work is reasonable, then function_exists shouldn't work too, because it is useless testing if a function exists when itself is used as a parameter. otherwise, this is a waste of codes within the function_exists().
- i am using PHP v5.2.3
- this is not a question of the usage of the function but the integrity of the function
Last edited by mainstream; 09-04-2007 at 04:17 AM.
Because "print" is a PHP language construct, not a function.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)