<p>At the team with which I work, we have an old codebase using PHP's ibase_* functions all over the code to communicate with database. We created a wrapper to it that would do something else beside just calling the original function and I did a mass search-replace in the entire code to make sure that wrapper is used instead.</p>

<p>Now, how do we prevent usage of ibase_* functions in the future?</p>

<p>Preferably, I'd like to still have them available, but make it throw a NOTICE or WARNING when it is used.</p>

<p>A solution in pure PHP (not needing to compile a custom version of PHP) is preferred.</p>

I haven't checked it by myself, but found this in my bookmarks:
http://wiki.php.net/rfc/e-user-deprecated-warning
Edit: Okay this doesn't work yet - so instead of E_USER_DEPRECATED just use something like E_USER_NOTICE:
```
```
<?php
class Foo
{   
    public function __construct()
    {
        trigger_error('Use Bar instead', E_USER_NOTICE);
    }
}

$foo = new Foo()
```
```
This will end up with this:
```
```
Notice: Use Bar instead in /home/unexist/projects/ingame/svn/foo.php on line 6
```
```