Data Type: class: Object : use of the objects

TextPad 4.0 : my favorite PHP-Editor : Simple and Easy

Codes:

<?php
echo "OK : FYI White Spaces are ignored : Goooood" ;
class myclass
{
public function Test($test)
{
echo " <br/> <font style='color:red;'>
Do Something <br/>".$test."</font>";
}
}
$obj1 = new myclass();
echo "<br/> <font style='color:Green;'>
Object 1 created</font> <br/>";
$obj1->Test("calling back");
echo "<br/>Object1 Successfully instantiated <br/>";
$obj2 = new myclass();
echo "<br/> <font style='color:Green;'>
Object 2 created</font> <br/>";
$obj2->Test("More Calls");
echo "<br/>Object2 Successfully instantiated <br/>";
?>

 

The above is just get-going with  creating object from classes, and the code below shows the way of converting classes.

 Converting to object :
 
If an object is converted to an object, it is not modified.

Run Time Views