Skip to main content

Classes and Objects

  • Chapter
  • First Online:
PHP and MySQL Recipes
  • 2623 Accesses

Abstract

Object-oriented programming provides many advantages over procedural programming. It helps with encapsulation when code is shared within a team or between teams and it can help protect elements of the code from being abused. This is especially the case when code is shared in compiled form but the same mechanisms can be applied to a scripting language like PHP. This chapter describes how object-oriented programming works in PHP.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Frank M. Kromann

About this chapter

Cite this chapter

Kromann, F.M. (2016). Classes and Objects. In: PHP and MySQL Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0605-8_2

Download citation

Publish with us

Policies and ethics