- var_dump: documentation ( source)
- json_decode: documentation ( source)
- preg_replace: documentation ( source)
- json_encode: documentation ( source)
<?php
function e($o){return json_decode(preg_replace('/\\\u0000[*a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\\u0000/','',json_encode((array)$o)),1);}
class Foo
{
public $bar = 'barValue';
protected $baz = 'bazValue';
private $biz = 'bizValue';
}
$foo = new Foo();
var_dump(e($foo));