static function __init() { foreach (get_declared_classes() as $v) { if (0 !== strncasecmp($v, 'Patchwork', 9)) { self::$declaredClass[] = $v; } } foreach (self::$parsers as $k => $v) { is_bool($v) || ($v = self::$parsers[$k] = 0 > $v ? PHP_VERSION_ID < -$v : PHP_VERSION_ID >= $v); $v && class_exists('Patchwork\\PHP\\Parser\\' . $k); } if (file_exists($v = PATCHWORK_PROJECT_PATH . ".patchwork.shims.ser")) { $v = unserialize(file_get_contents($v)); Parser\FunctionShim::loadShims($v[0]); Parser\ConstantInliner::loadConsts($v[1]); } }
function getShims() { $o = $this->newShims; $this->newShims = array(array(), array()); return array(Parser\FunctionShim::loadShims($o[0]), Parser\ConstantInliner::loadConsts($o[1])); }