Using the -> and :: operators to call hypnotize : static properties « Class « PHP
- PHP
- Class
- static properties
Using the -> and :: operators to call hypnotize
<?php
class Cat {
}
class MyCat extends Cat {
function MyCat( ) {
}
public static function hypnotize( ) {
echo ("The cat was hypnotized.");
return;
}
}
MyCat::hypnotize( );
$h_cat = new MyCat( );
$h_cat->hypnotize( );
Related examples in the same category