- var_dump: documentation ( source)
<?php
$domd=new DOMDocument();
$str = "DOMDocument";
var_dump($domd instanceof $str);
var_dump($domd instanceof ("DOMDocument"));
// ^ is legal.
// V is illegal
// var_dump($domd instanceof "DOMDocument");
$code = '
var_dump($domd instanceof ("DOMDocument"));
';
eval($code);
// the eval hack is for illustration, make it an error at run-time, rather than compile-time.