- json_decode: documentation ( source)
- microtime: documentation ( source)
- json_encode: documentation ( source)
<?php
$arr = array('a' => 12, 'b' => 'foo', 'caution' => array('blubb' => array('bar' => 'baz')));
$start = microtime(true);
$obj1 = json_decode(json_encode($arr), false);
$end = microtime(true) - $start;
echo "Run: " . $end . PHP_EOL;