original_string: public static function fileToArray($file)
      {
          if (! is_file($file) && ! filter_var($file, FILTER_VALIDATE_URL)) {
              self::arrayToFile([], $file);
          }
  
          $json = @file_get_contents($file);
          $array = json_decode($json, true);
          $lastError = JsonLastError::check();
  
          return $array === null || !is_null($lastError) ? false : $array;
      }
code: public static function fileToArray($file)
      {
          if (! is_file($file) && ! filter_var($file, FILTER_VALIDATE_URL)) {
              self::arrayToFile([], $file);
          }
  
          $json = @file_get_contents($file);
          $array = json_decode($json, true);
          $lastError = JsonLastError::check();
  
          return $array === null || !is_null($lastError) ? false : $array;
      }
code_tokens: public static function fileToArray ( $ file ) { if ( ! is_file ( $ file ) && ! filter_var ( $ file , FILTER_VALIDATE_URL ) ) { self :: arrayToFile ( [ ] , $ file ) ; } $ json = @ file_get_contents ( $ file ) ; $ array = json_decode ( $ json , true ) ; $ lastError = JsonLastError :: check ( ) ; return $ array === null || ! is_null ( $ lastError ) ? false : $ array ; }
docstring: Save to array the JSON file content.
  
  @param string $file → path or external url to JSON file
  
  @return array|false
docstring_tokens: Save to array the JSON file content .