Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |
rfc:improve_mysqli [2020/12/30 18:26] – typo dharman | rfc:improve_mysqli [2020/12/30 18:27] (current) – Grammar dharman |
---|
=== "new mysqli()" doesn't open a connection with 0 arguments === | === "new mysqli()" doesn't open a connection with 0 arguments === |
| |
At the moment PHP manual claims that all 6 parameters of ''%%mysqli::__construct()%%'' are optional with default values taken from INI settings. As you might have guessed that is not entirely true. The default values are in fact honoured, but at least 1 argument must be provided, even if that 1 argument is ''NULL''. If absolutely no arguments are passed, then ''%%mysqli::__construct()%%'' behaves as ''mysqli_init()''. What are the workarounds if I want to store all my configuration details in INI? | At the moment PHP manual claims that all 6 parameters of ''%%mysqli::__construct()%%'' are optional with default values taken from INI settings. As you might have guessed that is not entirely true. The default values are in fact honoured, but at least 1 argument must be provided, even if that 1 argument is ''NULL''. If absolutely no arguments are passed, then ''%%mysqli::__construct()%%'' behaves as ''mysqli_init()''. Here are the workarounds if you want to store all the configuration details in INI: |
| |
<code php> | <code php> |