Results 1 to 2 of 2

Thread: Ligth Talk

  1. #1
    Join Date
    Aug 2007

    Ligth Talk

    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 05:17 AM.

  2. #2
    Join Date
    Aug 2004
    Because "print" is a PHP language construct, not a function.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center