www.webdeveloper.com
Results 1 to 3 of 3

Thread: Can a class catch a function call, when it doesn't contain the function?

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Posts
    207

    Can a class catch a function call, when it doesn't contain the function?

    So I i had a class like:

    class testClass{

    }

    and i created an object of this class:

    $test = new testClass();

    If I were to call a function that didn't exist, like:

    $test->someFunction()

    Is there anyway that I can catch this function call from, within testClass, and retrieve the function name, without getting a fatal error?

    Thanks in advance.

  2. #2
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Yup. See __call.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  3. #3
    Join Date
    Jun 2008
    Posts
    207
    Perfect, thanks

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



Recent Articles