-function __autoload($c) {
- return include /*"phar://pharext.phar/".*/strtr($c, "\\_", "//") . ".php";
+spl_autoload_register(function($c) {
+ return include strtr($c, "\\_", "//") . ".php";
+});
+
+set_include_path('phar://' . __FILE__ .":". get_include_path());
+
+if (!extension_loaded("Phar")) {
+ fprintf(STDERR, "ERROR: Phar extension not loaded\n\n");
+ fprintf(STDERR, "\tPlease load the phar extension in your php.ini\n".
+ "\tor rebuild PHP with the --enable-phar flag.\n\n");
+ exit(1);