Actually i am not able to convert php object to array and specially when i have other access specifier. for example:
<?php
class Foo
{
public $bar = 'barValue';
protected $baz = 'bazValue';
private $tab = 'tabValue';
}
$foo = new Foo();
$arrayFoo = (array) $foo;
echo "<pre>";
var_dump($arrayFoo);
and output is:
array(3) {
["bar"]=>
string(8) "barValue"
["*baz"]=>
string(8) "bazValue"
["Footab"]=>
string(8) "tabValue"
}
so i am not able to get the key with its name, it automatic added * (for protected) and class name (for private),