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.
Now, how do we prevent usage of ibase_* functions in the future?
Preferably, I'd like to still have them available, but make it throw a NOTICE or WARNING when it is used.
A solution in pure PHP (not needing to compile a custom version of PHP) is preferred.
Since these have been implicitly enforced since PHP 5.2. 1, PHP 7.3 deprecated their usage as they are redundant.
trigger_error()
function my_deprecated_function() { trigger_error("Deprecated function called.", E_USER_NOTICE); // do stuff. }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With