Is the mysql_insert_id function suitable for retrieving the correct ID value when working with BIGINT columns in PHP?

When working with BIGINT columns in MySQL, the mysql_insert_id function may not return the correct ID value due to limitations with PHP's integer type. To ensure the correct ID value is retrieved, it is recommended to use the mysqli_insert_id function instead, which supports BIGINT values.

// Connect to MySQL database
$conn = mysqli_connect("localhost", "username", "password", "database");

// Perform insert query
mysqli_query($conn, "INSERT INTO table_name (column_name) VALUES ('value')");

// Retrieve the correct ID value
$id = mysqli_insert_id($conn);

// Print the ID value
echo $id;