Che cosa fa un \
in PHP?Cosa fa un (backslash) in PHP (5.3+)?
Ad esempio, https://github.com/foxbunny/CSRF4PHP/blob/60d9172b7f0cd93346cac9065fb17182854ebf1c/CsrfToken.php#L80-L87 ha \FALSE
, \session_id
e \Exception
:
public function __construct($timeout=300, $acceptGet=\FALSE){
$this->timeout = $timeout;
if (\session_id()) {
$this->acceptGet = (bool) $acceptGet;
} else {
throw new \Exception('Could not find session id', 1);
}
}
Rende il codice meno leggibile. Ma per [riferimento: cosa significa questo simbolo in PHP] (http://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php) – mario
@mario argomento StackOverflow molto bello. Grazie per il link :) – Alfred
Immagino che questa domanda debba essere chiusa, ma non riesco a chiudere gli argomenti personalmente .. – Alfred