questions about comparisions in the PHP code base (Technics)

by Auge ⌂ @, Monday, February 05, 2018, 17:47 (16 days ago) @ danielb987


Please bear in mind, that the use of $_REQUEST is not the normal behaviour even it ispresent on several places. On most places the checks performs explicitely against $_GET or $_POST (or what else) to ensure the source of the variables. IMHO this has a better readability than $_REQUEST but also a better readability than a function (without a parameter to specify way of the incoming data) because in the code I can see the designated source of the data.

$foo = (!empty($_GET['bar'])) ? trim($_GET['bar']) : NULL; // ahhh, an URL-parameter

Tschö, Auge

further development of mlf1

Complete thread:

 RSS Feed of thread

powered by my little forum