1--TEST-- 2bcdiv — Divide two arbitrary precision numbers 3--CREDITS-- 4TestFest2009 5Antoni Torrents 6antoni@solucionsinternet.com 7--EXTENSIONS-- 8bcmath 9--FILE-- 10<?php 11try { 12 bcdiv('10.99', '0'); 13} catch (DivisionByZeroError $ex) { 14 echo $ex->getMessage(), PHP_EOL; 15} 16 17try { 18 bcdiv('10.99', '0.00'); 19} catch (DivisionByZeroError $ex) { 20 echo $ex->getMessage(), PHP_EOL; 21} 22 23try { 24 bcdiv('10.99', '-0.00'); 25} catch (DivisionByZeroError $ex) { 26 echo $ex->getMessage(), PHP_EOL; 27} 28?> 29--EXPECT-- 30Division by zero 31Division by zero 32Division by zero 33