1

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...

1 Answers1

2

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.

Community
  • 1
  • 1
takeit
  • 3,991
  • 1
  • 20
  • 36