function testMoneyStringToPennies($testArray) { echo 'TEST: ' . __METHOD__ . PHP_EOL; foreach ($testArray as $input => $output) { try { $money = new Money($input); $amount = $money->getAmount(); echo $input . ' => ' . $output . ' === ' . $amount . PHP_EOL; } catch (Exception $e) { } } }