PDO :: beginTransaction()在内部使用哪个MySql查询?

Whenever I needed a transaction in MySql, I have used PDO::beginTransaction() several times without any issues. However, when I needed to lock tables and still use transactions, I found that

  1. "LOCK TABLES is not transaction-safe and implicitly commits any active transaction before attempting to lock the tables" and
  2. "UNLOCK TABLES implicitly commits any active transaction, but only if LOCK TABLES has been used to acquire table locks",

according to this https://dev.mysql.com/doc/refman/5.7/en/lock-tables-and-transactions.html.

But the above reference also states that "The correct way to use LOCK TABLES and UNLOCK TABLES with transactional tables, such as InnoDB tables, is to begin a transaction with SET autocommit = 0 (not START TRANSACTION) followed by LOCK TABLES, and to not call UNLOCK TABLES until you commit the transaction explicitly"

I understand that SET autocommit = 0 and START TRANSACTION are technically the same in MySql. Correct me on this. But MySql reference above says to use

SET autocommit=0;
LOCK TABLES t1 WRITE, t2 READ, ...;
... do something with tables t1 and t2 here ...
COMMIT;
UNLOCK TABLES;

Now instead of that, can one also use

PDO::beginTransaction();
LOCK TABLES ...;
PDO::commit();
UNLOCK TABLES;

Since PHP PDO::beginTransaction() manual states "Turns off autocommit mode"?