PHP Operators Execution Operator (``)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

The PHP execution operator consists of backticks (``) and is used to run shell commands. The output of the command will be returned, and may, therefore, be stored in a variable.

// List files
$output = `ls`;
echo "<pre>$output</pre>";

Note that the execute operator and shell_exec() will give the same result.



Got any PHP Question?