<?php
class bank_account {
var $amount;
function bank_account($cash) {
$this->amount = $cash;
}
}
function deposit($account, $cash) {
$account->amount += $cash;
}
function withdraw(&$account, $cash) {
$account->amount -= $withdraw;
}
$wallet = new bank_account(100);
deposit($wallet, 50);
withdraw($wallet, 120);
echo "The account balance is: {$this->amount}";
?>
The account balance is: -20