php - 'Strict Standards: Only variables should be passed by reference' error -


i implementing phpmobilizer on website. have created subdomain "m" contains file following code (this 1 section):

function __construct($url){     $this->url = $url;     $this->server = preg_replace('/^m\./', '', $_server['server_name']);     $this->ext = strtolower(end(explode('.', $this->url)));     $this->patterns = array();     $this->replacements = array();     $this->cookiedomain = $this->__getcookiedomain(); } 

the error getting on line 15:

$this->ext = strtolower(end(explode('.', $this->url))); 

strict standards: variables should passed reference in website.com/m/phpmobilizer.class.php on line 15

this code using in head section redirect mobile users "m" subdomain. have tested mobile subdomain google's mobile friendly test , working correctly.

the error being caused use of 'end()'. array passed end() reference.

try splitting code e.g.

$urlparts = explode('.', $this->url); $this->ext = strtolower(end($urlparts)); 

reference: http://php.net/manual/en/function.end.php