- var_dump: documentation ( source)
<?php
declare(strict_types=1);
class Test {
function __toInt() {
return 10;
}
function __toFloat() {
return 10.00;
}
function __toString() {
return "10";
}
}
var_dump((int) new Test, (float) new Test, (string) new Test);