php Programming Glossary: xpublic
Array to Object and Object to Array in PHP - interesting behaviour http://stackoverflow.com/questions/6325447/array-to-object-and-object-to-array-in-php-interesting-behaviour Class test has two properties public and private. public xpublic 'x1' private xprivate 'x2' testObj new test Let's convert testObj.. settype testObj 'array' var_dump testObj Result array 2 xpublic string 3 x1 testxprivate string 4 x2 OK xprivate property becomes.. object testObj var_dump newObj Result object stdClass #1 2 xpublic string 3 xxx xprivate test private string 4 xxx3 newObj is a..
|