Skip to main content

Objects

  • Chapter
  • First Online:
PHP 8 Basics

Abstract

So far, we have covered several data types, including the string, integer, and float. You’ve learned how to use strings, integers, and arrays. Each of these types has their own benefits and limitations. An integer cannot use the letter “s” as a value, and a string can contain an integer of “1.” With arrays, you learned about the idea of a compound data type. This data type allows for combining and intermixing of different elements. An array can contain both letters and numbers, contain specific key-pair values (associative array), or just contain an organized set of data. The end result is that values of more than one type can be stored together in a single variable.

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 16.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

© 2023 Gunnard Engebreth, Satej Kumar Sahu

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Engebreth, G., Sahu, S.K. (2023). Objects. In: PHP 8 Basics. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-8082-9_8

Download citation

Publish with us

Policies and ethics