Jump to content

[SOLVED] Source code for the built in Exception Class


PC Nerd

Recommended Posts

Hi,

 

I've had a look around and im looking for the source code for the Exception class.  I've seen form a number of sources the class design ( ie, a list of member variables and methods) - but I wanted to look at the actual source for the class.

 

Can anyone suggest where this might be?

 

Thanks

Ok,

Ive run it through Reflection - and it seems that all I get is an output of the classes properties and methods - not the actual source code that was used to create the class.  Is the Exception class written in PHP or is it "built" in the C/C++ in compilation?

 

Thanks

 

 

 

 

 

Ive placed what I get below:

<?php
echo "<pre>";
Reflection::export(new ReflectionClass('Exception'));
echo "</pre>";
?>

DISPLAYS:


Class [  class Exception ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [0] {
  }

  - Properties [6] {
    Property [  protected $message ]
    Property [  private $string ]
    Property [  protected $code ]
    Property [  protected $file ]
    Property [  protected $line ]
    Property [  private $trace ]
  }

  - Methods [9] {
    Method [  final private method __clone ] {
    }

    Method [   method __construct ] {

      - Parameters [2] {
        Parameter #0 [  $message ]
        Parameter #1 [  $code ]
      }
    }

    Method [  final public method getMessage ] {
    }

    Method [  final public method getCode ] {
    }

    Method [  final public method getFile ] {
    }

    Method [  final public method getLine ] {
    }

    Method [  final public method getTrace ] {
    }

    Method [  final public method getTraceAsString ] {
    }

    Method [  public method __toString ] {
    }
  }
}

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.