note 104969 added to class.domainexception

From: Date: Tue, 19 Jul 2011 10:27:43 +0000
Subject: note 104969 added to class.domainexception
Groups: php.notes 
Request: Send a blank email to php-notes+get-181690@lists.php.net to get a copy of this message
<?php function divide($dividend, $divisor) { if($divisor == 0) { throw new \DomainException( 'Zero does not belong to the domain of this functions.' ); } return $dividend / $divisor; } ?> <?php function logarithm($argument, $base) { if($base <= 0 || $base == 1) { throw new \DomainException( 'Specified base does not belong to the domain of this function.' ); } if($argument <= 0) { throw new \DomainException( 'Specified argument does not belong to the domain of this function.' ); } return log($argument, $base); } ?> ---- Server IP: 82.177.164.100 Probable Submitter: 83.27.87.234 ---- Manual Page -- http://www.php.net/manual/en/class.domainexception.php Edit -- https://master.php.net/note/edit/104969 Del: integrated -- https://master.php.net/note/delete/104969/integrated Del: useless -- https://master.php.net/note/delete/104969/useless Del: bad code -- https://master.php.net/note/delete/104969/bad+code Del: spam -- https://master.php.net/note/delete/104969/spam Del: non-english -- https://master.php.net/note/delete/104969/non-english Del: in docs -- https://master.php.net/note/delete/104969/in+docs Del: other reasons-- https://master.php.net/note/delete/104969 Reject -- https://master.php.net/note/reject/104969 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181690) next »