PHP Execution Operator

In this chapter you will learn:

  1. What is an execution operator
  2. What is PHP Execution Operator
  3. Example - How to use PHP Execution Operator

Description

Execution operator passes commands to the operating system for execution, then capture the results.

Syntax

PHP uses backticks (`) as its execution operator.

Example

The following code will run the command dir and output its results to the screen.


<?PHP
print `dir`; 
?>

The code above generates the following result.

Next chapter...

What you will learn in the next chapter:

  1. What is Operator Precedence
  2. A list of the operators in order of precedence (highest first):
  3. Use parentheses to overwrite Operator Precedence
Home » PHP Tutorial » PHP Operators
PHP Assignment Operators
PHP Arithmetic Operators
PHP Incrementing and Decrementing Operators
PHP Comparison Operators
PHP Logical Operators
PHP String Operators
PHP Ternary Operator
PHP Bitwise Operators
PHP Execution Operator
PHP Operator Precedence