Quantcast
Channel: Spiceworks Community
Viewing all articles
Browse latest Browse all 39

Practical PHP OOP Examples?

$
0
0

JoeyH3 wrote:


All of the examples and tutorials I've seen so far basically show how to use OOP and what it does, but I've yet to see anything to help me determine where OOP should be used. Like, is everything on a page supposed to be an object? Or am I just supposed to create objects when code get repetitive, and otherwise follow a procedural flow?


That's procedural programming with functions, just putting repetition into functions.  In theory with OOP, you would put every into an object.  Everything.

Try Java for a few days.  Java forces everything to be an object.  It will change your thought process.

Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>