(PHP 5, PHP 7, PHP 8)
mysqli::stmt_init -- mysqli_stmt_init — Initializes a statement and returns an object for use with mysqli_stmt_prepare
Object-oriented style
public mysqli::stmt_init(): mysqli_stmt|false
Procedural style
mysqli_stmt_init(mysqli $mysql): mysqli_stmt|false
Allocates and initializes a statement object suitable for mysqli_stmt_prepare().
Note:
Any subsequent calls to any mysqli_stmt function will fail until mysqli_stmt_prepare() was called.
mysql
Procedural style only: A mysqli object returned by mysqli_connect() or mysqli_init()
Returns an object.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/mysqli.stmt-init.php