Skip to content

Instantly share code, notes, and snippets.

@timersys
Created April 8, 2015 12:33
Show Gist options
  • Select an option

  • Save timersys/1ee28904d97b2ed2c3ff to your computer and use it in GitHub Desktop.

Select an option

Save timersys/1ee28904d97b2ed2c3ff to your computer and use it in GitHub Desktop.
Debug tips, get all errors and check where class was defined
<?php
/**
* Display all errors no matter what
* /
error_reporting(E_ALL);
ini_set('display_errors', 1);
/**
* Find where the class was defined
* /
class Foo {}
$reflector = new ReflectionClass('Foo');
echo $reflector->getFileName();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment