static function ¤t_scope() { $scope =& parent::current_scope(); if (self::$debug_level < self::DEBUG_LEVEL_SCOPE_INSPECTION) { return $scope; } # Scope inspection, checking if any watched var is changed if ($scope && isset($scope['vars'])) { foreach ($scope['vars'] as $k => $v) { foreach (self::$watch_list as $var => $current) { if ($var == $k) { if ($v != $current) { self::$watch_list[$var] = $v; self::debug("WATCH: \${$var}=" . self::cap($v)); } break; } } } } # current_scope() is called a lot, usually not useful in debug output #self::debug("current_scope()",self::DEBUG_LEVEL_SCOPE_INSPECTION); return $scope; }