Checking if a transaction is still open in PDO

Code
<?php

$pdo 
= new PDO('mysql:dbname=boo;host=127.0.0.1');

$pdo->beginTransaction();

var_dump($pdo->inTransaction());

// error happens and rollback is invoked
$pdo->rollBack();

var_dump($pdo->inTransaction());
Result
bool(true)
bool(false)