Object Properties

<?
class Item {
  var $name = "item";
}$obj1 = new Item();
$obj2 = new Item();
$obj1->name = "widget 5442";
print "$obj1->name<br />";
print "$obj2->name<br />";?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.