DevPath

Make a transfer atomic and consistent

Mid · practical lab · 25 min · runtime php-cli

Brief

A transfer debits one account and credits another. Show the transaction boundary and the invariant you must enforce, and explain how a crash between the two writes is handled.

3 progressive hints are available in the editor.

Public checks

  • single transaction — expected: both writes inside one transaction