Timmow is right that there is a method Criteria::toString(), but it is not a magic method _toString()that is automatically called when an object is referenced as a string.
If you want to see SQL, you must explicitly call Criteria::toString().
$c = new Criteria();
echo $c->toString();
source
share