str::parse($string, $mode = 'json')

Parses a string by a set of available methods

  • $string (string)
  • $mode (string)
  • return (string)

Example

str::parse('{"test":"cool","super":"genious"}');
//output: array(
// 'test' => 'cool',
// 'super' => 'genious'
//);

str::parse('<xml><entries><cool>nice</cool></entries></xml>', 'xml');
//output: array(
//  'entries' => array(
//   'cool' => 'nice'
//)
//);