downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<bcdivbcmul>
Last updated: Thu, 26 Jun 2008

bcmod

(PHP 4, PHP 5)

bcmod — Get modulus of an arbitrary precision number

Description

string bcmod ( string $left_operand , string $modulus )

Get the modulus of the left_operand using modulus .

Parameters

left_operand

The left operand, as a string.

modulus

The modulus, as a string.

Return Values

Returns the modulus as a string, or NULL if modulus is 0.

Examples

Example #1 bcmod() example

<?php
echo bcmod('4', '2'); // 0
echo bcmod('2', '4'); // 2
?>

See Also



add a noteadd a note User Contributed Notes
Get modulus of an arbitrary precision number
There are no user contributed notes for this page.




<bcdivbcmul>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs