Throw a NotImplementedError in PHP?

PHP does not have a built-in NotImplementedException however you’re welcome to create your own. I suppose BadMethodCallException comes close which would be a decent candidate for extension

class NotImplementedException extends BadMethodCallException
{}

… and in your method

public function notImplementedMethod()
{
    throw new NotImplementedException();
}

You can also very simply do something like this

throw new Exception('Not implemented');

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)