understand your point and that you probably based your code like this.
but some time ago php7 (or more recent, like 8) deprecated the mssql function, regardless of queries by odbc or not.
it is currently replaced by sqlsrv and can serve you completely well and with excellent stability (and...