PHP Implementation of array and string in OOP style