I want to make such thing in php: I want to have the parent class named "item", and a bunch of child classes like "sword", "armor" etc. I can call simply:
$some_sword = new sword($id) ;
But I also want to do sth like this:
$some_sword = new item("sword",$id) ;
And I want both codes do he same effect. $some_sword must be the same class in both ways!