In javascript, we can edit the prototype of objects like string and numbers and simply "add functions" to already existing native classes.
I was wondering how do we "add functions" to already existing php native classes (like strings etc) ?
You can't do that in PHP. You can only inherit from the existing classes (if they're not final) and add methods to the subclasses.
"a string".Action(). we can do this in javascript and in vb.net