Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/9

Click to flip

9 Cards in this Set

  • Front
  • Back
What are the three ways to mark coding?
<?
?>

<?php
?>


<SCRIPT LANGUAGE="php">
</SCRIPT>
What is the precedence of PHP operators?
Associativity | Operators
non-associative new
right [
right ! ~ ++ -- (int) (float) (string) (array) (object) @
left * / %
left + - .
left << >>
non-associative < <= > >=
non-associative == != === !==
left &
left ^
left |
left &&
left ||
left ? :
right = += -= *= /= .= %= &= |= ^= <<= >>=
right print
left and
left xor
left or
left ,
What are the arithmetic operators in PHP?
Example Name Result
$a + $b Addition Sum of $a and $b.
$a - $b Subtraction Difference of $a and $b.
$a * $b Multiplication Product of $a and $b.
$a / $b Division Quotient of $a and $b.
$a % $b Modulus Remainder of $a divided by $b.
PHP supports eight primitive types.
Name 1 type?
Boolean- This is the easiest type. A boolean expresses a truth value. It can be either TRUE or FALSE.
PHP supports eight primitive types.
Name 1 type?
Boolean- This is the easiest type. A boolean expresses a truth value. It can be either TRUE or FALSE.
What are the 8 types that PHP supports?
PHP supports eight primitive types.

Four scalar types:
boolean
integer
float (floating-point number, aka 'double')
string

Two compound types:
array
object

And finally two special types:
resource
NULL
What are variables?
Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case-sensitive.

Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
What is a constant?
A constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script (except for magic constants, which aren't actually constants). A constant is case-sensitive by default. By convention, constant identifiers are always uppercase.
What is an expression?
Expressions are the most important building stones of PHP. In PHP, almost anything you write is an expression. The simplest yet most accurate way to define an expression is "anything that has a value".