@@ -31,6 +31,19 @@ tightly integrated at the core level.
3131PHP TRUE ASYNC is supported for PHP 8.5.0 and later.
3232` LibUV ` is the primary reactor implementation for this extension.
3333
34+ ### Docker (for tests)
35+
36+ ``` bash
37+ # Build the image
38+ docker build -t true-async-php .
39+
40+ # Run interactively
41+ docker run -it true-async-php bash
42+
43+ # Check TrueAsync module
44+ docker run --rm true-async-php php -m | grep TrueAsync
45+ ```
46+
3447### Requirements
3548
3649- ** PHP 8.5.0+**
@@ -160,6 +173,14 @@ Please see the [LibUV installation guide](https://github.com/libuv/libuv) for mo
160173- ` gethostbyaddr() ` - resolve IP address to hostname
161174- ` gethostbynamel() ` - get list of IP addresses for hostname
162175
176+ ### Database Functions
177+ - ** PDO MySQL** - async-compatible PDO operations
178+ - ` PDO::__construct() ` , ` PDO::prepare() ` , ` PDO::exec() ` - non-blocking
179+ - ` PDOStatement::execute() ` , ` PDOStatement::fetch() ` - async data access
180+ - ** MySQLi** - async-compatible MySQLi operations
181+ - ` mysqli_connect() ` , ` mysqli_query() ` , ` mysqli_prepare() ` - non-blocking
182+ - ` mysqli_stmt_execute() ` , ` mysqli_fetch_*() ` - async result fetching
183+
163184### CURL Functions
164185- ` curl_exec() ` - execute cURL request
165186- ` curl_multi_exec() ` - execute multiple cURL handles
@@ -289,6 +310,39 @@ $elapsed = microtime(true) - $start;
289310echo "All requests completed in: " . round($elapsed, 3) . "s\n";
290311```
291312
313+ ### Async Database Operations
314+
315+ ``` php
316+ <?php
317+
318+ // Concurrent database queries with PDO MySQL
319+ Async\spawn(function() {
320+ $pdo = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
321+
322+ // All operations are non-blocking in async context
323+ $stmt = $pdo->prepare("SELECT * FROM users WHERE active = ?");
324+ $stmt->execute([1]);
325+
326+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
327+ echo "User: {$row['name']}\n";
328+ }
329+ });
330+
331+ // MySQLi concurrent operations
332+ Async\spawn(function() {
333+ $mysqli = new mysqli('localhost', $user, $pass, 'test');
334+
335+ // Non-blocking query execution
336+ $result = $mysqli->query("SELECT COUNT(*) as total FROM orders");
337+ $row = $result->fetch_assoc();
338+ echo "Total orders: {$row['total']}\n";
339+
340+ $mysqli->close();
341+ });
342+
343+ echo "Database queries started\n";
344+ ```
345+
292346### Process Execution
293347
294348``` php
0 commit comments