Menu Riverview Church

PRINT

Output a string

print is a language construct, not a function, so parentheses are not required.

SYNTAX

print ( string $arg ) : int

PARAMETERS

arg

The input data.

RETURN

Returns 1, always.

EXAMPLES

1

Hello World!

2

without parentheses

3

spans
multiple lines - newlines
are also
output

4

spans
multiple lines - newlines
are also
output

5

escaping characters: "like this"

6

variable with double quotes: variable

7

variable with single quotes: $var

8

array: value

9

This uses the "here document" syntax to output
multiple lines with variable interpolation. Note
that the "here document" terminator must appear on a
line with just a semicolon no extra whitespace!

PHP