1. Go to this page and download the library: Download cwola/transaction library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cwola / transaction example snippets
use Cwola\Transaction;
$transaction = new Transaction\Transaction;
$transaction->begin();
echo $transaction->inTransaction()
? 'OPENED' : 'CLOSED';
// output : OPENED
$transaction->commit();
echo $transaction->inTransaction()
? 'OPENED' : 'CLOSED';
// output : CLOSED