print_r(), just like var_dump() does NOT cast an object, not even if it has a __toString() method - which is normal.
<?php
class A {
public function __toString() {
return 'In class A';
}
}
$a = new A;
echo $a; // In class A
print_r($a); // A Object()
// you can simulate the echo by casting it manually
print_r((string)$a); // In class A