original_string: private static function stringify($value)
      {
          if (is_string($value)) {
              return sprintf('"%s"', preg_replace('/\n/', '\n', $value));
          }
  
          if (is_bool($value)) {
              return $value ? 'true' : 'false';
          }
  
          if (is_null($value)) {
              return 'null';
          }
  
          if (is_array($value)) {
              return sprintf('[%s]', implode(', ', array_map(
                  function ($value) {
                      return self::stringify($value);
                  },
                  $value
              )));
          }
  
          return (string) $value;
      }
code: private static function stringify($value)
      {
          if (is_string($value)) {
              return sprintf('"%s"', preg_replace('/\n/', '\n', $value));
          }
  
          if (is_bool($value)) {
              return $value ? 'true' : 'false';
          }
  
          if (is_null($value)) {
              return 'null';
          }
  
          if (is_array($value)) {
              return sprintf('[%s]', implode(', ', array_map(
                  function ($value) {
                      return self::stringify($value);
                  },
                  $value
              )));
          }
  
          return (string) $value;
      }
code_tokens: private static function stringify ( $ value ) { if ( is_string ( $ value ) ) { return sprintf ( '"%s"' , preg_replace ( '/\n/' , '\n' , $ value ) ) ; } if ( is_bool ( $ value ) ) { return $ value ? 'true' : 'false' ; } if ( is_null ( $ value ) ) { return 'null' ; } if ( is_array ( $ value ) ) { return sprintf ( '[%s]' , implode ( ', ' , array_map ( function ( $ value ) { return self :: stringify ( $ value ) ; } , $ value ) ) ) ; } return ( string ) $ value ; }
docstring: Stringify the given value. It can handles strings, booleans, null values and arrays. The other types would be
  casted into string.
  
  @param string $value The value to stringify.
  
  @return string The string representation of the given value.
docstring_tokens: Stringify the given value . It can handles strings booleans null values and arrays . The other types would be casted into string .