I have been programming in PHP for many years, and I have always wondered if there is a way to “pre-concatenate” a string. Example:
$path = '/lib/modules/something.php';
$server = $_SERVER['DOCUMENT_ROOT'];
I have been doing this for many years to add a value to the beginning of the line:
$path = $server . $path;
Is there a shortcut for this? Just curious.
source
share