Would You Want to Do It Procedurally?

Knowledge of OOP is a requirement for anything beyond trivial use of the SimpleXML and SOAP extensions to PHP. OOP is not only a necessity in order to take full advantage of PHP, but it is by far the easiest way to read a feed or use SOAP. A procedural approach to either of the tasks presented in this chapter is not really feasible. Any attempt would unquestionably be much more difficult and require many, many more lines of code. Using built-in objects hides the complexity of implementing web services and makes their implementation much easier for the developer.

Get Object-Oriented PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.