0

I've modified some code, pasted from elsewhere to suit my needs, but i stumbled upon these weird single quotes, and their output surprised me a lot

$test = `nslookup google.com`;
echo $test;

This actually performs an nslookup, without running doing anything but defining the variable, how is this possible?

halfer
  • 19,824
  • 17
  • 99
  • 186
dg30585
  • 23
  • 3
  • 4
    See also [Reference - What does this symbol mean in PHP?](http://stackoverflow.com/q/3737139) – mario Dec 10 '13 at 23:25

1 Answers1

3

They are called "Execution Operators", and they are actually not single quotes, but backticks.

You can read more here:

http://php.net/manual/en/language.operators.execution.php

halfer
  • 19,824
  • 17
  • 99
  • 186
Jeppe
  • 2,163
  • 2
  • 14
  • 15