15) return array('ok'=>false,'reason'=>'depth','offset'=>$i,'containers'=>$containers,'tokens'=>$tokens); } elseif ($c === '}' || $c === ']') { --$depth; $in_atom = false; } elseif ($c === ',' || $c === ':' || $c === ' ' || $c === "\n" || $c === "\r" || $c === "\t") { $in_atom = false; } elseif (!$in_atom) { ++$tokens; $in_atom = true; } if ($containers > $container_limit || $tokens > $token_limit) { return array('ok'=>false,'reason'=>$containers > $container_limit ? 'containers' : 'tokens','offset'=>$i,'containers'=>$containers,'tokens'=>$tokens); } } return array('ok'=>true,'reason'=>'within_budget','offset'=>$n,'containers'=>$containers,'tokens'=>$tokens); }