A:
$var = $_GET['param']; // and then referencing $var through the script.
A constant time equal to zero in computer science is required.
B: Link
$_GET['param'];
This is an ugly approach and is performed only by "sloppy" programmers.
Let's say that you need to use $_GET['param'] 10 times on one page or on several pages, and then you decide that you want to change the parameter 'param' to 'p' or 'parameter', then you're out of luck.
You want to initialize the "magic numbers" and "magic values" of the variable (or constant) that you can edit later, and the programmer (regardless of whether you want it or someone else) does not know exactly what it is.
Imagine if programmers will use
if($number == 3.1415)
instead
if($number == $pi)
it comes down to a similar basis.
So no, no option is usually theoretically faster, but option B is going to give you hell later and ugly.
source share