Hi Internals, I would like to hear your opinions about the following page in the PHP manual: https://www.php.net/manual/en/mysqli.examples-basic.php
Currently, this is the only "example" apart from the quick start guide. There is a whole section https://www.php.net/manual/en/mysqli.examples.php which suggests that there were more or that there was meant to be more examples, however there is only that one example now. People have complained about the quality of this example for a number of years, including myself. The page does not show best practices, encourages SQL injection, poor error handling, and lacks prepared statement example. As a result, it does more harm than good. There are two possible solutions. 1. Get rid of the examples section. 2. Write a proper mysqli example. While I could create a PR suggesting a better example, I would advise that we remove it completely. This API is not suited to be used directly in business logic. This functionality should be wrapped in a database abstraction layer. For this reason, this example is not much more useful than the examples located on each function's own page. Users writing abstraction libraries are interested more in an example for a particular function rather than an overall example. What are your opinions? Would it be ok to remove that page? Best Regards, Kamil Tekiela -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php