According to the book I am reading, print
ing object that does not have __toString()
implemented should throw an error:
Object of class popp\ch04\batch22\Person could not be converted to string ...
When I try to do this, I am getting a message Process finished with exit code 255
, but no descriptive error. I am using PhpStorm.
<?php
class Person{}
$person = new Person();
try {
print $person;
} catch(Exception $e) {
print $e;
}
Is there a switch I should enable to receive errors?