What are the backtick operators (``) called in the context of evaluating their content?
3 Answers
Backticks (``) is an execution operator. PHP will attempt to execute the contents of the backticks as a shell command; the output will be returned (i.e., it won't simply be dumped to output; it can be assigned to a variable). Use of the backtick operator is identical to shell_exec()
.
For example,
<?php
$output = `ls -la`;
echo "<pre>$output</pre>";
?>
For more information, refer to Execution Operators.

- 30,738
- 21
- 105
- 131

- 1,282
- 11
- 23
If you're referring to Bash then the backticks are known as "command substitution". $()
provides similar functionality.

- 30,738
- 21
- 105
- 131

- 68,181
- 7
- 71
- 64
In Perl, the backtick operator has a synonym: qx//. The q and x stand for "quote & execute." You'll see it referred to as 'command' too, but frankly, in the Perl community and throughout most of the Perl documentation, they're just called the backtick operator or backticks. Calling them anything other than backticks or the backtick operator in the context of a Perl program will simply make it harder to know what one is talking about.

- 13,812
- 3
- 38
- 66
-
1N.B. Perl also has a `system` command which has a different return (the exit status) than backticks which returns the output. Therefore be careful not to call the backticks a system call. – Joel Berger May 14 '11 at 17:35
-
2Therefore be careful not to call the backticks a system() call. A "system call" means something else entirely: http://en.wikipedia.org/wiki/System_call – tadmc May 14 '11 at 21:14