rfc:improve_mysqli
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:improve_mysqli [2020/12/30 17:56] – Initial dharman | rfc:improve_mysqli [2020/12/30 18:27] (current) – Grammar dharman | ||
---|---|---|---|
Line 41: | Line 41: | ||
Let's break this point into smaller issues. At the moment we have at least 4 ways of opening a connection to the MySQL server and at least 2 ways of initializing mysqli object without connecting. Each one is slightly different than the other. | Let's break this point into smaller issues. At the moment we have at least 4 ways of opening a connection to the MySQL server and at least 2 ways of initializing mysqli object without connecting. Each one is slightly different than the other. | ||
- | === mysqli:: | + | === mysqli:: |
- | Despite what the documentation says, '' | + | Despite what the documentation says, '' |
The only valid use case for this method was in polymorphism, | The only valid use case for this method was in polymorphism, | ||
Line 63: | Line 63: | ||
=== "new mysqli()" | === "new mysqli()" | ||
- | At the moment PHP manual claims that all 6 parameters of '' | + | At the moment PHP manual claims that all 6 parameters of '' |
<code php> | <code php> | ||
Line 88: | Line 88: | ||
</ | </ | ||
- | 2. You can call '' | + | 2. You can call '' |
- | >Passing the null value or the string " | + | |
- | The above applies to '' | + | |
3. The whole notion of functional //aliases// for constructors is quite strange. They might be equivalent in functionality, | 3. The whole notion of functional //aliases// for constructors is quite strange. They might be equivalent in functionality, | ||
Line 122: | Line 120: | ||
} | } | ||
</ | </ | ||
+ | The documentation should be improved and stop calling the function and the constructor as aliases. | ||
=== mysqli_init() and mysqli_real_connect() are weird aliases that do not match OO style. === | === mysqli_init() and mysqli_real_connect() are weird aliases that do not match OO style. === | ||
Line 249: | Line 248: | ||
The existing prepared statement parameter binding will remain unaffected. There will be no change to '' | The existing prepared statement parameter binding will remain unaffected. There will be no change to '' | ||
- | The existing procedural style connection will remain the same. The only potential difference would be that `mysqli_connect()` with 0 arguments no longer opens the default connection. | + | The existing procedural style connection will remain the same. The only potential difference would be that '' |
- | Opening the connection while setting options before will remain the same in procedural form. Setting the connection flags will also remain the same with the only difference that it will now become available using the normal | + | Opening the connection while setting options before will remain the same in procedural form. Setting the connection flags will also remain the same with the only difference that it will now become available using the normal |
===== Future Scope ===== | ===== Future Scope ===== |
rfc/improve_mysqli.1609350972.txt.gz · Last modified: 2020/12/30 17:56 by dharman