Musical Palace
 
Modules
· Home
· Laura Magori Creations - Ploaia (The Rain)
· About Laura Magori (Laura Angey)
· Cv Laura Magori
· Diplome
· Duos
· Invited Artist: Alexander Zailer
· Laura Magori Audiochanel
· Laura Magori Creations -New Years Night
· Photos
· Search
· SL
· Statistics
· Stories Archive
· Wallpapers
La Playa



Quiero Ser



Someday My Prince Will Come



So This Is Love



Wanna Know What Love Is



And I Love You So



Type Operators

Type Operators

PHP has a single type operator: instanceof is used to determine whether a given object, his parents or their implemented interfaces are of a specified object class.

The instanceof operator was introduced in PHP 5. Before this time is_a() was used but is_a() has since been deprecated in favor of instanceof.

<?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

See also get_class() and is_a().

free php nuke theme by ethaidesign.com
Website Power by PHPNuke.org. PHPNuke Theme Design By Ethaidesign.com