title: Migration to PHP 8.1 - how to fix Deprecated Passing null to parameter error - rename build in functions
body: <p>PHP 8.1 has deprecated passing null as parameter to a lot of functions. The main problem is with functions like &quot;htmlspecialchars&quot; and &quot;trim&quot;, where null no longer is silently converted to empty string.
  To fix this issue with out going thru huge amount of code I was traying to rename original build in functions and replace them with wrappers that can fix input from null to empty string.
  The main problem is, that function &quot;rename_function&quot; no longer works, last update on this is from 2004.
  I need some sort of override of build in functions, to avoid writing null check each time function is called making all my code x2 larger.
  Only other solution I can think of is to use only my custom functions, but this still require going thru all my code un and third party libraries I have.</p>
  <p>In PHP 8.1 when null is passed to build in function, it is no longer silently converted to empty string.</p>