3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * * @param string $strUserAgent The headers user agent. When not set it's evaluated by $_SERVER["HTTP_USER_AGENT"] * @return NETRADA_Tools_UserAgent The Instance of the userAgent */ public static function getInstance($strUserAgent = null) { if(self::$_instance === null) { self::$_instance = new NETRADA_Tools_UserAgent($strUserAgent); } else { if($strUserAgent != null) { self::$_instance->setUserAgent($strUserAgent); } } return self::$_instance; }
Output for 5.4.0 - 5.4.4
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in lDloc on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.14
Parse error: syntax error, unexpected T_PUBLIC in lDloc on line 7
Process exited with code 255.

preferences:
162.62 ms | 1395 KiB | 27 Q