Class Inheritance: dereferencing: PHP 4 Over PHP 5:
Disclaimer: Spiritofsoccer.com is hibernating as a private domain.
<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>dereferencing in php5</title> </head>
<body text="#FFFF00" bgcolor="#000080"> This an example of $object->method_1[]->method_2 <br/> This becomes one step shorter than using php4 <br> where you would have been calling like this<br> $Y= new classYY <br> $x= $Y->methodYY <br> $x->methodZZ <br> <form method="POST" action="object_array.php5">
<input type="text" name="T1" size="20"> <br><input type="submit" value="Submit" name="B1"></p></form>
<?php $y=$_POST['T1']; class member { public $name;
function __construct($name="unnamed") { $this->name = $name; } }
class Club { //array of Clubs public $n; }
//create empty Club organization $C = new Club; $C->member[]= new member("Jhon"); $C->member[]= new member("Jacob"); $C->member[]= new member("Jingle");