code: public static function isJSON(string &$value = null, bool $mutate = true): bool
      {
          $result = preg_match(self::PATTERN_JSON, $value) == true;
  
          $json = null;
  
          if($result)
          {
              $json = json_decode($value, true);
  
              if($mutate && $json !== null)
                  $value = $json;
          }
  
          return $json !== null && $result;
      }
docs: private const PATTERN_EVAL    = "/(\`.*\`)/";