method toArray documentation in bbn\X

Converts a JSON string or an object into an array.

Example

$file = new stdClass(); $file->foo = "bar"; $file->bar = "foo"; X::toArray($file); /* array [ 'foo' => 'bar', 'bar' => 'foo' ] function($obj) { $obj = \is_string($obj) ? $obj : json_encode($obj); return json_decode($obj, true); }

Converts a JSON string or an object into an array. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.