[TYPO3-dev] Getting id of the page

Tapio Markula tapio.markula at dnainternet.net
Mon Aug 28 10:43:44 CEST 2006


Heiner Lamprecht kirjoitti:

> I don't think, it's easier to read.  $_GET is referred to as a 
> superglobal variable.  So if an other developer reads a line like
> 
> $id = $_GET['id'];
> 
> he will most likely assume, that $_GET is really what it's supposed 
> to be according to PHP documentation.  If you want to save source 
> code size and performance, IMHO it would be better to do something 
> like
> 
> $myGet = t3lib_div::_GET();
> 
> ...
> 
> $id = $myGet['id'];
> 
> 
> Now, it's clear to everybody, that $myGet is different from the 
> superglobal $_GET.
> 
> The performance will be the same, but it's more clear to everyone 
> who reads the code.
> 
> 
>     Heiner
> 
ok - that's good idea. Thank's.




More information about the TYPO3-dev mailing list