Denes Csesznegi
Denes Csesznegi

Reputation: 25

Symfony2/Doctrine Rollback differences

I am using Symfony2 and Doctrine for a project and need to do lots of database operations in transactions.

try {
    // do db operations
} catch(\Exception $e) {
    // rollback here
}

My question is the following: Is there a difference between ->rollback() and ->rollBack() ? If there is, what is it?

Thanks in advance...

Upvotes: 1

Views: 753

Answers (1)

takeit
takeit

Reputation: 4081

Functions names in PHP are case-insensitive. If you use rollback() or rollBack() it results in the same method execution which in this case is rollBack().

See this answer.

Upvotes: 2

Related Questions