HostingTrade :: Powerful Hosting Solutions
Home Hosting Domains Support About
Satisfied Customers - that's our brand...
Client Login




Support
FAQ
Forums
HelpDesk (NEW!)

Documentation

Statistics
Goodies
HostingTrade.com Web Hosting
Status Verified by
Web Hosting Stuff

Monitored by
UptimeAgent

DNameTrade.com :: Low Cost Domain Names
.: Useful Links :.

Confused with
tech-lingo?

NetLingo.com
Documentation

Type Operators

PHP has a single type operator: instanceof. instanceof is used to determine whether a given object is of a specified object class.

instanceof was introduced in PHP 5.

<?php class A { } class B { } $thing = new A; if ($thing instanceof A) { echo 'A'; } if ($thing instanceof B) { echo 'B'; } ?>

As $thing is an object of type A, but not B, only the block dependent on the A type will be executed:

A

 
© 2003-2009 . Service Line, Inc.
2Checkout.com, Inc. is an authorized retailer of HostingTrade.com