note 102727 deleted from language.operators.type by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: Tumba College of Tech Rwanda ~ PHP Group 

----

Try This ....
<?php
	class ABC
	{
	
	
	}
	$a = new ABC();
	
	echo '$a instanceof ABC = ';
	var_dump($a instanceof ABC);
	echo '<hr/>';

	define('NAME','ABC');
	
	echo '$a instanceof $x = ';
	var_dump($a instanceof NAME);
?>
<?php

/*
$a instanceof ABC = bool(true)
$a instanceof $x = bool(false) 
*/

?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.