Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (version_compare(phpversion(), '5.3.1', '<')) {
- if (substr(phpversion(), 0, 5) != '5.3.1') {
- // this small hack is because of running RCs of 5.3.1
- echo "Zend_Code requires PHP 5.3.1 or newer.\n";
- exit -1;
- }
- }
- foreach (array('phar', 'spl', 'pcre', 'simplexml') as $ext) {
- if (!extension_loaded($ext)) {
- echo 'Extension ', $ext, " is required\n";
- exit -1;
- }
- }
- try {
- Phar::mapPhar();
- } catch (Exception $e) {
- echo "Cannot process Zend_Code phar:\n";
- echo $e->getMessage(), "\n";
- exit -1;
- }
- spl_autoload_register(function ($class) {
- $class = str_replace(array('_', '\\'), '/', $class);
- if (file_exists('phar://' . __FILE__ . '/Zend_Code-@PACKAGE_VERSION@/php/' . $class . '.php')) {
- include 'phar://' . __FILE__ . '/Zend_Code-@PACKAGE_VERSION@/php/' . $class . '.php';
- }
- });
- $phar = new Phar(__FILE__);
- $sig = $phar->getSignature();
- define('Zend_Code_SIG', $sig['hash']);
- define('Zend_Code_SIGTYPE', $sig['hash_type']);
- __HALT_COMPILER();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement