I would like to know, why extending a built-in class in php is important. I mean let's take the PDO class for example. One can either work with using new PDO(); or class Foo extends PDO. to do the same task. I guess, maybe the only thing that makes sense here is, that if I extend the class, there may be less overhead during the scripts run time, because I am working from something within the class, and I may be able to work with public, protects methods and properties, and also add more of those, but that is as far as my understanding of the purpose comes.
Also, par of the reason why I asked, is I tried to extend the PDO class, but I can't seem to find anything to extend. There are no public or protected properties, so I can't do anything.
If someone knows the answer to this question, I would really like a simple example by extending the PDO class, and doing something that otherwise, you can't do without extending it.
thanks