⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

mysqli_poll()

The mysqli_poll() function is used to examine (poll) a list of connections on which we initiated asynchronous queries using the MYSQLI_ASYNC flag. In the code, we will open 10 parallel connections that will read this data simultaneously, and the mysqli_poll() function will check which one finished first.

EXAMPLE
RESULT
The result will be displayed here...

Practical use: This is an ultimate optimization technique. Instead of PHP waiting for the response of one query before sending the next, it sends them all at once. This drastically shortens page load times when working with large amounts of data.