After I have upgraded my localhost wamp server to php 5.3.10, the var_dump does not print results that are as readable/pretty as they used to be.
$obj = (object) array('qualitypoint', 'technologies', 'India');
var_dump($obj);
object(stdClass)#2 (3) { [0]=> string(12) "qualitypoint" [1]=> string(12) "technologies" [2]=> string(5) "India" }
As you can see that everything now is cramp into one line.
It used to print something like this below though,
object(stdClass)#1 (3) {
[0]=> string(12) "qualitypoint"
[1]=> string(12) "technologies"
[2]=> string(5) "India"
}
How can I make var_dump to return a readable formatted result?
Is normal PHP output for this code:
For more readable format You probably used Xdebug extension for PHP.
Check You PHP extensions directory (PHP directory/ext/ on Windows).
If there is not file with name like this:
Download one for You PHP version
Put it in extensions directory add to PHP configuration (php.ini file) bellow other PHP extensions.
Example:
Restart Apache and var_dump() output will be formatted like this: