You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to extend The Base FullNameParse class. I realized that /** * Parse Static entry point. * * @param string $name the full name you wish to parse * @return array returns associative array of name parts */ public static function parse($name) { $parser = new static(); return $parser->parse_name($name); }
this static entry function does not uses the new self(); keyword rather than the new static(); keyword making that function useless when extending. Thanks in advance!
The text was updated successfully, but these errors were encountered:
While trying to extend The Base FullNameParse class. I realized that
/** * Parse Static entry point. * * @param string $name the full name you wish to parse * @return array returns associative array of name parts */ public static function parse($name) { $parser = new static(); return $parser->parse_name($name); }
this static entry function does not uses the
new self();
keyword rather than thenew static();
keyword making that function useless when extending. Thanks in advance!The text was updated successfully, but these errors were encountered: