" $stmt " obviously (I think) means "expression". As a variable name it is arbitrary, you can name this variable what you want. $stmt is rather rather idiomatic.
A prepared statement as such is a database function. The database itself takes a request in two stages: first, the structure of the request with placeholders, and secondly, data for filling placeholders. The assertion objects on the PHP side represent this separation and should provide you with a handle representing the prepared statement on the SQL server side.
The point of this separation is that there is no way to have problems with SQL injection due to improper escaping of arbitrary string values; it is also useful for performance if you reuse this prepared statement more than once.
source share