3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Create a table with a LONGTEXT and pull in some data */ $mysqli = new mysqli("127.0.0.1", "root", "root", "test_hhvm"); if ($mysqli->connect_errno) { echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error; } if (!$mysqli->query("DROP TABLE IF EXISTS test") || !$mysqli->query("CREATE TABLE test(label LONGTEXT)")) { echo "Table creation failed: (" . $mysqli->errno . ") " . $mysqli->error; } $mysqli->query('INSERT INTO test(label) values ("test")'); /* * Hit the bug, expect a segfault on hhvm */ $stmt = $mysqli->prepare("SELECT label FROM test"); $stmt->execute(); $stmt->bind_result($label); while($stmt->fetch()) { echo "$label" . PHP_EOL; } $stmt->close(); $mysqli->close(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "mysqli" not found in /in/sZbYe:7 Stack trace: #0 {main} thrown in /in/sZbYe on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.47 ms | 401 KiB | 8 Q