| Types - common types for PHP | ||
|---|---|---|
| Prev | ||
OString is a php string wrapper object that implement mostly used string functions.
The existance of this class comes from two simple facts:
string_* php functions have not the same parameter system, sometimes you pass the string variable at the begining, sometimes at the end.
string_* php functions are not as clear as a good old object when you have to read oriented object code.
Of course the usage of a string wrapper class will slower 'a bit' program execution. I don't recommand to use it everywhere but only where explaining the code is more important than executing it quickly.
You should also use the OString class whenever your program waits for an object an not a basic php string variable.