Chapter

Basics

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. What are PHP strings and how should they be treated?

    "PHP has a built-in string type. Internally, PHP strings are simply a sequence of bytes, but for our purposes we can treat it as a 0-indexed character array. PHP strings are mutable and can be changed

  2. How can you create and reassign strings in PHP?

    "We can create strings by assigning a string literal value to a variable. Strings can be specified by either single quotes or double quotes (there are no individual characters in PHP, only single char

  3. How are PHP strings copied and modified by character?

    "The assignment operator can also be used to make copies of strings.\n\n1 $firstName = \"Thomas\";\n\n2 $alias = $firstName;\n\nIt is important to understand that this assignment makes a deep copy of

Basics | ComputerScienceOne | Bifalgorithm | Bifalgorithm