thank you, alexander........... as i know, php is quite similar to java......... i know java much more than php, and i also refer to java when code the php. for me, there are quite big difference between php4 and php5 for the OO part..... can you show me how to code the java in php way? here is the java file : ---------------------------------------------------------------------------------- public class Item { private String item; public Item(String item){ this.item = item; } public Item(Item item){ this.item = item.item; } public String getItem() { return item; } public void setItem(String item) { this.item = item; } public boolean equals(Object o) { return item.equals(((Item)o).item); //casting } public int compareTo(Object o) { return item.compareTo(((Item)o).item); } public String toString() { return item; } public static void main(String args[]){ Item i1 = new Item("1"); Item i2 = new Item("1"); Item i3 = new Item("2"); System.out.println(i1); System.out.println(i1.equals(i2)); System.out.println(i1.equals(i3)); } } -------------------------------------------------------------------------------------- if it is not convenient, it's ok...... thanks anyway............. :)