mysqli_connect()
function mysqli_connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null): mixed
Implemented by the compiler-injected mysqli prelude.
Parameters:
$hostname(?string), defaultnull, optional$username(?string), defaultnull, optional$password(?string), defaultnull, optional$database(?string), defaultnull, optional$port(?int), defaultnull, optional$socket(?string), defaultnull, optional
Returns: mixed
Availability
- Compiled (AOT): supported through an injected elephc-PHP prelude.
eval()(magician interpreter): not available inside eval’d code.
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how mysqli_connect is implemented in the compiler, see the internals page.