[PHP-DOC] cvs: phpdoc /en/functions math.xml
hholzgraThu Mar 14 07:38:05 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: rand() / mt_rand() prototype changes Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.76 phpdoc/en/functions/math.xml:1.77 --- phpdoc/en/functions/math.xml:1.76 Thu Mar 14 02:10:37 2002 +++ phpdoc/en/functions/math.xmlThu Mar 14 07:38:05 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -924,11 +924,7 @@ Description intmt_rand - - - - intmt_rand - intmin + intmin intmax @@ -1262,7 +1258,7 @@ intrand intmin - intmax + intmax If called without the optional min,
[PHP-DOC] cvs: phpdoc /en/functions math.xml
philip Thu Mar 14 02:10:43 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: rand: parameters are optional, removing void reference Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.75 phpdoc/en/functions/math.xml:1.76 --- phpdoc/en/functions/math.xml:1.75 Mon Mar 4 05:38:50 2002 +++ phpdoc/en/functions/math.xmlThu Mar 14 02:10:37 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -1261,12 +1261,8 @@ Description intrand - - - - intrand - intmin - intmax + intmin + intmax If called without the optional min,
[PHP-DOC] cvs: phpdoc /en/functions math.xml
cortesi Mon Mar 4 05:38:50 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: another typo Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.74 phpdoc/en/functions/math.xml:1.75 --- phpdoc/en/functions/math.xml:1.74 Mon Mar 4 05:32:36 2002 +++ phpdoc/en/functions/math.xmlMon Mar 4 05:38:50 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -742,7 +742,7 @@ Returns &true; if val is infinite (positive or - negative), like the result of log(0) or any value to + negative), like the result of log(0) or any value too big to fit into a float on this platform.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
cortesi Mon Mar 4 05:32:37 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: typo fix Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.73 phpdoc/en/functions/math.xml:1.74 --- phpdoc/en/functions/math.xml:1.73 Sat Mar 2 12:23:04 2002 +++ phpdoc/en/functions/math.xmlMon Mar 4 05:32:36 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -722,7 +722,7 @@ floatval - Returns &true; if val is a leagal finite + Returns &true; if val is a legal finite number within the allowed range for a PHP float on this platform.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
hholzgraSat Mar 2 12:23:04 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: copy&paste bug :( Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.72 phpdoc/en/functions/math.xml:1.73 --- phpdoc/en/functions/math.xml:1.72 Sat Mar 2 12:18:14 2002 +++ phpdoc/en/functions/math.xmlSat Mar 2 12:23:04 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -761,10 +761,8 @@ floatval - Returns &true; if val is 'not a number', like the result of acos(1.01). -
[PHP-DOC] cvs: phpdoc /en/functions math.xml
hholzgraSat Mar 2 12:18:15 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: added is_finite(), is_infinite(), is_nan() Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.71 phpdoc/en/functions/math.xml:1.72 --- phpdoc/en/functions/math.xml:1.71 Sat Feb 2 10:36:02 2002 +++ phpdoc/en/functions/math.xmlSat Mar 2 12:18:14 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -705,6 +705,66 @@ &warn.experimental.func; &warn.undocumented.func; + + + + + + +is_finite + + + + +Description + + boolis_finite + floatval + + + Returns &true; if val is a leagal finite + number within the allowed range for a PHP float on this platform. + + + + + + +is_infinite + + + + +Description + + boolis_infinite + floatval + + + Returns &true; if val is infinite (positive or + negative), like the result of log(0) or any value to + big to fit into a float on this platform. + + + + + + +is_nan + + + + +Description + + boolis_nan + floatval + + + + Returns &true; if val is 'not a number', + like the result of acos(1.01). +
[PHP-DOC] cvs: phpdoc /en/functions math.xml
slawek Tue Jan 29 17:07:50 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: little cleanup Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.69 phpdoc/en/functions/math.xml:1.70 --- phpdoc/en/functions/math.xml:1.69 Tue Jan 15 15:30:04 2002 +++ phpdoc/en/functions/math.xmlTue Jan 29 17:07:49 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -1152,9 +1152,8 @@ Returns the decimal equivalent of the octal number - represented by the octal_string argument. - OctDec converts an octal string to a decimal number. The largest - number that can be converted is 177 or 2147483647 in + represented by the octal_string argument. + The largest number that can be converted is 177 or 2147483647 in decimal. @@ -1222,7 +1221,7 @@ Some examples of pow - +
[PHP-DOC] cvs: phpdoc /en/functions math.xml
drews Tue Jan 15 15:30:04 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: changed the highest value for decbin() to the correct one. more to come :( Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.68 phpdoc/en/functions/math.xml:1.69 --- phpdoc/en/functions/math.xml:1.68 Mon Jan 14 04:45:55 2002 +++ phpdoc/en/functions/math.xmlTue Jan 15 15:30:04 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -501,7 +501,7 @@ Returns a string containing a binary representation of the given number argument. The largest number that can be converted is - 2147483647 in decimal resulting to a string of 31 1's. + 4294967295 in decimal resulting to a string of 32 1's. See also the bindec function.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
philip Mon Jan 14 04:45:56 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: pi: Document precicion directive's affect, as well as the M_PI constant. And, some other minor changes. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.67 phpdoc/en/functions/math.xml:1.68 --- phpdoc/en/functions/math.xml:1.67 Thu Jan 10 08:42:36 2002 +++ phpdoc/en/functions/math.xmlMon Jan 14 04:45:55 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -118,9 +118,9 @@ - Only M_PI is available in PHP versions up to and including PHP4RC1. - All other constants are available starting with PHP 4.0. Constants - labelled [4.0.2] were added in PHP 4.0.2. + Only M_PI is available in PHP versions up to and including PHP 4.0.0. + All other constants are available starting with PHP 4.0.0. Constants + labeled [4.0.2] were added in PHP 4.0.2. @@ -1177,14 +1177,19 @@ - Returns an approximation of pi. + Returns an approximation of pi. The returned float + has a precision based on the + precision directive in + php.ini, which defaults to 14. + Also, you can use the M_PI constant which yields + identical results to pi.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jan Thu Jan 10 08:42:36 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: added see also sqrt for pow Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.66 phpdoc/en/functions/math.xml:1.67 --- phpdoc/en/functions/math.xml:1.66 Wed Jan 9 18:59:53 2002 +++ phpdoc/en/functions/math.xmlThu Jan 10 08:42:36 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -1238,7 +1238,7 @@ - See also exp. + See also exp and sqrt.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
irc-htmlWed Jan 9 18:59:53 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: added example to abs(), corrected spelling errors Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.65 phpdoc/en/functions/math.xml:1.66 --- phpdoc/en/functions/math.xml:1.65 Wed Jan 9 18:43:26 2002 +++ phpdoc/en/functions/math.xmlWed Jan 9 18:59:53 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -145,6 +145,16 @@ otherwise it is integer (as float usually has a bigger value range than integer). + + abs example + + + + @@ -632,7 +642,7 @@ Returns the next lowest integer value by rounding down - value if neccessary. + value if necessary. The return value of floor is still of type float because the value range of float is usually bigger than that of int.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
irc-htmlWed Jan 9 18:43:27 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: added example for ceil() Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.64 phpdoc/en/functions/math.xml:1.65 --- phpdoc/en/functions/math.xml:1.64 Tue Jan 1 19:44:14 2002 +++ phpdoc/en/functions/math.xmlWed Jan 9 18:43:26 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -413,6 +413,15 @@ float as the value range of float is usually bigger than that of int. + + ceil examples + + + + See also floor and round.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jimwTue Jan 1 19:44:14 2002 EDT Modified files: /phpdoc/en/functionsmath.xml Log: sqrt: see also pow Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.63 phpdoc/en/functions/math.xml:1.64 --- phpdoc/en/functions/math.xml:1.63 Sat Dec 15 09:44:59 2001 +++ phpdoc/en/functions/math.xmlTue Jan 1 19:44:14 2002 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -1422,6 +1422,9 @@ Returns the square root of arg. + + + See also pow.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
hholzgraSat Dec 15 09:45:00 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: added skeletons for missing functions Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.62 phpdoc/en/functions/math.xml:1.63 --- phpdoc/en/functions/math.xml:1.62 Wed Dec 12 15:47:00 2001 +++ phpdoc/en/functions/math.xmlSat Dec 15 09:44:59 2001 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -585,6 +585,29 @@ + + +expm1 + + Returns exp(number) - 1, computed in a way that accurate even + when the value of number is close to zero + + + +Description + + + float expm1 + float number + + + &warn.experimental.func; + + &warn.undocumented.func; + + + + floor @@ -690,6 +713,29 @@ + + +hypot + + Returns sqrt( num1*num1 + num2*num2) + + + +Description + + + float hypot + float num1 + float num2 + + +&warn.experimental.func; + + &warn.undocumented.func; + + + + lcg_value @@ -750,6 +796,29 @@ + + +log1p + + Returns log(1 + number), computed in a way that accurate even when the val +ue of number is close to zero + + + +Description + + + float log1p + float number + + +&warn.experimental.func; + + &warn.undocumented.func; + + + + max @@ -1129,7 +1198,7 @@ Some examples of pow - +
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jimwSat Dec 8 14:33:17 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: floor: duh, it does round down, not truncate. stupid negative numbers. :) Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.60 phpdoc/en/functions/math.xml:1.61 --- phpdoc/en/functions/math.xml:1.60 Sat Dec 8 14:32:00 2001 +++ phpdoc/en/functions/math.xmlSat Dec 8 14:33:17 2001 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -599,7 +599,7 @@ - Returns the next lowest integer value by truncating + Returns the next lowest integer value by rounding down value if neccessary. The return value of floor is still of type float because the value range of float is
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jimwSat Dec 8 14:32:00 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: floor: add examples, say 'truncating' instead of 'rounding down'. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.59 phpdoc/en/functions/math.xml:1.60 --- phpdoc/en/functions/math.xml:1.59 Sat Nov 17 22:07:18 2001 +++ phpdoc/en/functions/math.xmlSat Dec 8 14:32:00 2001 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -599,12 +599,21 @@ - Returns the next lowest integer value by rounding down + Returns the next lowest integer value by truncating value if neccessary. The return value of floor is still of type - float as the value range of float is + float because the value range of float is usually bigger than that of int. + + floor examples + + + + See also ceil and round.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
cortesi Thu Nov 15 04:38:47 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: added missing colon Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.57 phpdoc/en/functions/math.xml:1.58 --- phpdoc/en/functions/math.xml:1.57 Sun Nov 11 05:42:08 2001 +++ phpdoc/en/functions/math.xmlThu Nov 15 04:38:47 2001 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -937,7 +937,7 @@ See also mt_rand, - mt_srand rand, + mt_srand, rand, srand, and getrandmax.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
gobaSun Nov 11 05:42:08 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Documenting a bunch of mathematical functions: sinh, cosh, tanh, asinh, acosh, atanh The last three are not available on windows... Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.56 phpdoc/en/functions/math.xml:1.57 --- phpdoc/en/functions/math.xml:1.56 Sat Nov 10 16:49:37 2001 +++ phpdoc/en/functions/math.xmlSun Nov 11 05:42:08 2001 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -162,10 +162,37 @@ - Returns the arc cosine of arg in radians. + Returns the arc cosine of arg in radians. - See also asin and atan. + See also acosh, asin + and atan. + + + + + + +acosh +Inverse hyperbolic cosine + + +Description + + + float acosh + float arg + + + + Returns the inverse hyperbolic cosine of + arg, i.e. the value whose + hyperbolic cosine is arg. + +¬e.no-windows; + + See also acos, asin + and atan. @@ -187,7 +214,34 @@ Returns the arc sine of arg in radians. - See also acos and atan. + See also asinh, acos + and atan. + + + + + + +asinh +Inverse hyperbolic sine + + +Description + + + float asinh + float arg + + + + Returns the inverse hyperbolic sine of + arg, i.e. the value whose + hyperbolic sine is arg. + +¬e.no-windows; + + See also asin, acos + and atan. @@ -209,7 +263,34 @@ Returns the arc tangent of arg in radians. - See also asin and acos. + See also atanh, asin + and acos. + + + + + + +atanh +Inverse hyperbolic tangent + + +Description + + + float atanh + float arg + + + + Returns the inverse hyperbolic tangent of + arg, i.e. the value whose + hyperbolic tangent is arg. + +¬e.no-windows; + + See also atan, asin + and acos. @@ -359,6 +440,30 @@ + + +cosh +Hyperbolic cosine + + +Description + + + float cosh + float arg + + + + Returns the hyperbolic cosine of arg, + defined as (exp(arg) + exp(-arg))/2. + + + See also cos, acosh, + sin and tan. + + + + decbin @@ -1190,6 +1295,30 @@ + + +sinh +Hyperbolic sine + + +Description + + + float sinh + float arg + + + + Returns the hyperbolic sine of arg, + defined as (exp(arg) - exp(-arg))/2. + + + See also sin, asinh, + cos and tan. + + + + sqrt @@ -1264,6 +1393,30 @@ See also sin and cos. + + + + + + +tanh +Hyperbolic tangent + + +Description + + + float tanh + float arg + + + + Returns the hyperbolic tangent of arg, + defined as sinh(arg)/cosh(arg). + + + See also tan, atanh, + sin and cos.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
ssb Wed Sep 19 20:50:08 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: * make better seeds in mt_srand/srand examples Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.51 phpdoc/en/functions/math.xml:1.52 --- phpdoc/en/functions/math.xml:1.51 Sat Sep 1 10:54:08 2001 +++ phpdoc/en/functions/math.xmlWed Sep 19 20:50:08 2001 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -794,8 +794,12 @@ seed. -// seed with microseconds since last "whole" second -mt_srand ((float) microtime() * 100); +// seed with microseconds +function make_seed() { +list($usec,$sec) = explode(" ", microtime()); +return ((double)$sec+(double)$usec) * 10; +} +mt_srand(make_seed()); $randval = mt_rand(); @@ -1223,8 +1227,12 @@ seed. -// seed with microseconds since last "whole" second -srand ((float) microtime() * 100); +// seed with microseconds +function make_seed() { +list($usec,$sec) = explode(" ", microtime()); +return ((double)$sec+(double)$usec) * 10; +} +srand(make_seed()); $randval = rand();
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jeroen Sat Sep 1 10:54:09 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Implemented user-notes to round() Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.50 phpdoc/en/functions/math.xml:1.51 --- phpdoc/en/functions/math.xml:1.50 Sun Aug 19 07:47:37 2001 +++ phpdoc/en/functions/math.xmlSat Sep 1 10:54:08 2001 @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -1126,13 +1126,28 @@ Returns the rounded value of val to specified precision (number of digits after the decimal point). + precision can also be negative or zero (default). + + + + + PHP doesn't handle strings like "12,300.2" correctly + by default. See converting from strings. + + + + -$foo = round (3.4); // $foo == 3.0 -$foo = round (3.5); // $foo == 4.0 -$foo = round (3.6); // $foo == 4.0 +$foo = round(3.4); // $foo == 3.0 +$foo = round(3.5); // $foo == 4.0 +$foo = round(3.6); // $foo == 4.0 +$foo = round(3.6, 0); // equivalent with above + +$foo = round(1.95583, 2); // $foo == 1.96 -$foo = round (1.95583, 2); // $foo == 1.96 +$foo = round(1241757, -3); // $foo == 1242000 @@ -1262,5 +1277,7 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -vim: ts=1 sw=1 et syntax=sgml +vim600: syn=xml +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 -->
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jeroen Sun Aug 12 17:37:24 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Fix that rand() bug; double->float; better min() documentation; possibly something else I don't remember right now :-) Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.47 phpdoc/en/functions/math.xml:1.48 --- phpdoc/en/functions/math.xml:1.47 Thu Aug 9 03:17:51 2001 +++ phpdoc/en/functions/math.xmlSun Aug 12 17:37:24 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -8,8 +8,9 @@ Introduction These math functions will only handle values within the range of - the long and double types on your computer. If you need to - handle bigger numbers, take a look at the integer and float types on your computer. + (this corresponds currently to the C types long resp. double) + If you need to handle bigger numbers, take a look at the arbitrary precision math functions. @@ -140,8 +141,8 @@ Returns the absolute value of number. If the argument number is of type float, the return type is also float, - otherwise it is int (as float usually has a - bigger value range than int). + otherwise it is integer (as float usually has a + bigger value range than integer). @@ -440,8 +441,8 @@ Description - double deg2rad - double number + float deg2rad + float number @@ -579,7 +580,7 @@ Description - double lcg_value + float lcg_value void @@ -652,14 +653,14 @@ If the first parameter is an array, max returns the highest value in that array. If the first parameter - is an integer, string or double, you need at least two parameters + is an integer, string or float, you need at least two parameters and max returns the biggest of these values. You can compare an unlimited number of values. - If one or more of the values is a double, all the values will be - treated as doubles, and a double is returned. If none of the - values is a double, all of them will be treated as integers, and + If one or more of the values is a float, all the values will be + treated as floats, and a float is returned. If none of the + values is a float, all of them will be treated as integers, and an integer is returned. @@ -674,10 +675,14 @@ Description - mixed min - mixed arg1 - mixed arg2 - mixed argn + number min + number arg1 + number arg2 + ... + + + number min + array numbers @@ -685,17 +690,20 @@ parameter values. - If the first parameter is an array, min - returns the lowest value in that array. If the first parameter - is an integer, string or double, you need at least two parameters + In the first variant, you need at least two parameters and min returns the lowest of these values. You can compare an unlimited number of values. - If one or more of the values is a double, all the values will be - treated as doubles, and a double is returned. If none of the - values is a double, all of them will be treated as integers, and - an integer is returned. + In the second variant, min + returns the lowest value in numbers. + + + If one or more of the values is a float, all the values + will be + treated as floats, and a float is returned. If none of the + values is a float, all of them will be treated as integers, + and an integer is returned. @@ -710,11 +718,15 @@ int mt_rand + + + + int mt_rand int - min + min int - max + max @@ -782,7 +794,7 @@ // seed with microseconds since last "whole" second -mt_srand ((double) microtime() * 100); +mt_srand ((float) microtime() * 100); $randval = mt_rand(); @@ -806,7 +818,7 @@ int mt_getrandmax - void + @@ -945,7 +957,7 @@ Description - double pi + float pi void @@ -1027,8 +1039,8 @@ Description - double rad2deg - double number + float rad2deg + float number @@ -1051,11 +1063,15 @@ int rand + + + + int rand int - min + min int - max + max @@ -1098,8 +1114,8 @@ Description - double round - double val + float round + float val int precision @@ -1192,7 +1208,7 @@ // seed with microseconds since last "whole" second -srand ((double) microti
[PHP-DOC] cvs: phpdoc /en/functions math.xml
sniper Thu Aug 9 03:17:51 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Reverted the change. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.46 phpdoc/en/functions/math.xml:1.47 --- phpdoc/en/functions/math.xml:1.46 Thu Aug 9 01:58:49 2001 +++ phpdoc/en/functions/math.xmlThu Aug 9 03:17:51 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -710,8 +710,11 @@ int mt_rand - - int min, int max + int + min + + int + max @@ -1048,8 +1051,11 @@ int rand - - int min, int max + int + min + + int + max
Re: [PHP-DOC] cvs: phpdoc /en/functions math.xml
[EMAIL PROTECTED] writes: > On Thu, Aug 09, 2001 at 05:58:49AM -, Jani Taskinen wrote: > > sniper Thu Aug 9 01:58:49 2001 EDT > > > > Modified files: > > /phpdoc/en/functionsmath.xml > > Log: > > Another try with this. This seems to 'compile'. > > Please revert this patch. > > -Egon +1 Torben > > Index: phpdoc/en/functions/math.xml > > diff -u phpdoc/en/functions/math.xml:1.45 phpdoc/en/functions/math.xml:1.46 > > --- phpdoc/en/functions/math.xml:1.45 Tue Aug 7 18:25:15 2001 > > +++ phpdoc/en/functions/math.xmlThu Aug 9 01:58:49 2001 > > @@ -1,4 +1,4 @@ > > - > > + > > > >Mathematical Functions > >Math > > @@ -710,11 +710,8 @@ > > > > > >int mt_rand > > - int > > - min > > - > > - int > > - max > > + > > + int min, int max > > > > > > > > @@ -1051,11 +1048,8 @@ > > > > > >int rand > > - int > > - min > > - > > - int > > - max > > + > > + int min, int max > > > > > > > > > > > > -- > -- > All known books about PHP and related books: http://php.net/books.php > Concert Band of the University of Hohenheim: http://www.concert-band.de/ > First and second bestselling book in German: http://www.php-buch.de/ -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com +1.604.709.0506
Re: [PHP-DOC] cvs: phpdoc /en/functions math.xml
On Thu, Aug 09, 2001 at 05:58:49AM -, Jani Taskinen wrote: > sniperThu Aug 9 01:58:49 2001 EDT > > Modified files: > /phpdoc/en/functions math.xml > Log: > Another try with this. This seems to 'compile'. Please revert this patch. -Egon > Index: phpdoc/en/functions/math.xml > diff -u phpdoc/en/functions/math.xml:1.45 phpdoc/en/functions/math.xml:1.46 > --- phpdoc/en/functions/math.xml:1.45 Tue Aug 7 18:25:15 2001 > +++ phpdoc/en/functions/math.xml Thu Aug 9 01:58:49 2001 > @@ -1,4 +1,4 @@ > - > + > >Mathematical Functions >Math > @@ -710,11 +710,8 @@ > > >int mt_rand > - int > - min > - > - int > - max > + > + int min, int max > > > > @@ -1051,11 +1048,8 @@ > > >int rand > - int > - min > - > - int > - max > + > + int min, int max > > > > > -- -- All known books about PHP and related books: http://php.net/books.php Concert Band of the University of Hohenheim: http://www.concert-band.de/ First and second bestselling book in German: http://www.php-buch.de/
[PHP-DOC] cvs: phpdoc /en/functions math.xml
sniper Thu Aug 9 01:58:49 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Another try with this. This seems to 'compile'. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.45 phpdoc/en/functions/math.xml:1.46 --- phpdoc/en/functions/math.xml:1.45 Tue Aug 7 18:25:15 2001 +++ phpdoc/en/functions/math.xmlThu Aug 9 01:58:49 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -710,11 +710,8 @@ int mt_rand - int - min - - int - max + + int min, int max @@ -1051,11 +1048,8 @@ int rand - int - min - - int - max + + int min, int max
[PHP-DOC] cvs: phpdoc /en/functions math.xml
eschmid Tue Aug 7 18:25:15 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Sorry, but this is not the way we can build a correct manual. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.44 phpdoc/en/functions/math.xml:1.45 --- phpdoc/en/functions/math.xml:1.44 Tue Aug 7 17:51:50 2001 +++ phpdoc/en/functions/math.xmlTue Aug 7 18:25:15 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -710,11 +710,11 @@ int mt_rand - [int - min + int + min int - max] + max @@ -1051,11 +1051,11 @@ int rand - [int - min + int + min int - max] + max
[PHP-DOC] cvs: phpdoc /en/functions math.xml
tom Tue Aug 7 17:51:50 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Egon: Maybe you like this more. If you dislike this also, pls. look for a solution and don't just re-implement a bug again Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.43 phpdoc/en/functions/math.xml:1.44 --- phpdoc/en/functions/math.xml:1.43 Mon Aug 6 23:38:28 2001 +++ phpdoc/en/functions/math.xmlTue Aug 7 17:51:50 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -710,11 +710,11 @@ int mt_rand - int - min + [int + min int - max + max] @@ -1051,11 +1051,11 @@ int rand - - int min + [int + min int - max + max]
[PHP-DOC] cvs: phpdoc /en/functions math.xml
eschmid Mon Aug 6 23:38:28 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Both arguments are optional, see the source code. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.42 phpdoc/en/functions/math.xml:1.43 --- phpdoc/en/functions/math.xml:1.42 Mon Aug 6 23:27:10 2001 +++ phpdoc/en/functions/math.xmlMon Aug 6 23:38:28 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -1054,8 +1054,8 @@ int min - - int max + int + max
[PHP-DOC] cvs: phpdoc /en/functions math.xml
eschmid Mon Aug 6 23:27:10 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Both arguments are optional, see the source code. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.41 phpdoc/en/functions/math.xml:1.42 --- phpdoc/en/functions/math.xml:1.41 Mon Aug 6 17:13:19 2001 +++ phpdoc/en/functions/math.xmlMon Aug 6 23:27:10 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -714,7 +714,7 @@ min int - max + max
[PHP-DOC] cvs: phpdoc /en/functions math.xml
tom Mon Aug 6 17:13:20 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: changed (mt_)rand-parameters (bug #12550) Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.40 phpdoc/en/functions/math.xml:1.41 --- phpdoc/en/functions/math.xml:1.40 Sat Aug 4 09:08:04 2001 +++ phpdoc/en/functions/math.xmlMon Aug 6 17:13:19 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -714,7 +714,7 @@ min int - max + max @@ -1055,7 +1055,7 @@ int min - int max + int max
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jeroen Sat Aug 4 09:08:04 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: New pow() documentation to reflect 407-changes Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.39 phpdoc/en/functions/math.xml:1.40 --- phpdoc/en/functions/math.xml:1.39 Thu Aug 2 13:37:02 2001 +++ phpdoc/en/functions/math.xmlSat Aug 4 09:08:04 2001 @@ -1,4 +1,4 @@ - + Mathematical Functions Math @@ -974,16 +974,42 @@ Description - float pow - float base - float exp + number pow + number base + number exp Returns base raised to the power of - exp. If this can't be computed, - exp will return NAN. + exp. If possible, this function will + return an integer. + + If the power cannot be computed, a warning will be issued, + and pow will return &false;. + + + Some examples of pow + + + + + + + In PHP 4.0.6 and earlier pow always returned + a float, and did not issue warnings. + + See also exp. @@ -1219,4 +1245,5 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: +vim: ts=4 sw=4 et syntax=sgml -->
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jeroen Sun Jul 8 16:39:26 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Damn tabs again Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.37 phpdoc/en/functions/math.xml:1.38 --- phpdoc/en/functions/math.xml:1.37 Sun Jul 8 16:31:34 2001 +++ phpdoc/en/functions/math.xmlSun Jul 8 16:39:25 2001 @@ -297,8 +297,8 @@ bindec converts a binary number to an -integer. The largest number that can be converted is -31 bits of 1's or 2147483647 in decimal. + integer. The largest number that can be converted is + 31 bits of 1's or 2147483647 in decimal. See also the decbin
Re: [PHP-DOC] cvs: phpdoc /en/functions math.xml
On Sun, 8 Jul 2001, Jeroen van Wolffelaar wrote: > - Octdec converts a binary number to a decimal number. The largest > - number that can be converted is 31 bits of 1's or 2147483647 in > - decimal. > + bindec converts a binary number to an > + integer. The largest number that can be converted is > + 31 bits of 1's or 2147483647 in decimal. Get rid of these tabs please... Derick
[PHP-DOC] cvs: phpdoc /en/functions math.xml
jeroen Sun Jul 8 16:31:38 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: typo Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.36 phpdoc/en/functions/math.xml:1.37 --- phpdoc/en/functions/math.xml:1.36 Thu Jun 28 11:53:23 2001 +++ phpdoc/en/functions/math.xmlSun Jul 8 16:31:34 2001 @@ -296,9 +296,9 @@ the binary_string argument. - Octdec converts a binary number to a decimal number. The largest - number that can be converted is 31 bits of 1's or 2147483647 in - decimal. + bindec converts a binary number to an +integer. The largest number that can be converted is +31 bits of 1's or 2147483647 in decimal. See also the decbin
[PHP-DOC] cvs: phpdoc /en/functions math.xml
danbeck Thu Jun 28 11:53:24 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: incorporating note from manual errata Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.35 phpdoc/en/functions/math.xml:1.36 --- phpdoc/en/functions/math.xml:1.35 Tue Jun 26 23:53:25 2001 +++ phpdoc/en/functions/math.xmlThu Jun 28 11:53:23 2001 @@ -859,6 +859,15 @@ the decimals and thousands_sep instead of a comma (",") between every group of thousands. + + + Only the first character of thousands_sep + is used. For example, if you use foo as + thousands_sep on the number + 1000, number_format will + return 1f000. + + number_format Example
[PHP-DOC] cvs: phpdoc /en/functions math.xml
danbeck Wed Jun 27 05:53:25 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: corrections, added void paramdefs where appropriate Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.34 phpdoc/en/functions/math.xml:1.35 --- phpdoc/en/functions/math.xml:1.34 Wed Jun 27 04:17:25 2001 +++ phpdoc/en/functions/math.xmlWed Jun 27 05:53:25 2001 @@ -512,7 +512,7 @@ int getrandmax - + void @@ -579,7 +579,7 @@ double lcg_value - + void @@ -805,7 +805,7 @@ int mt_getrandmax - + void @@ -894,8 +894,7 @@ See also: sprintf, - printf, sscanf and - fprintf. + printf and sscanf. @@ -937,7 +936,7 @@ double pi - + void @@ -948,7 +947,7 @@ echo pi(); -// echo's 3.1415926535898 +// will echo 3.1415926535898
[PHP-DOC] cvs: phpdoc /en/functions math.xml
danbeck Wed Jun 27 04:17:25 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: odd place for a period Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.33 phpdoc/en/functions/math.xml:1.34 --- phpdoc/en/functions/math.xml:1.33 Tue Jun 26 22:46:01 2001 +++ phpdoc/en/functions/math.xmlWed Jun 27 04:17:25 2001 @@ -1,6 +1,6 @@ Mathematical Functions - Math. + Math
[PHP-DOC] cvs: phpdoc /en/functions math.xml
danbeck Tue Jun 26 22:46:01 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: adding example to pi(), mostly so that they precision is obvious Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.32 phpdoc/en/functions/math.xml:1.33 --- phpdoc/en/functions/math.xml:1.32 Tue Jun 26 22:42:17 2001 +++ phpdoc/en/functions/math.xmlTue Jun 26 22:46:01 2001 @@ -943,6 +943,16 @@ Returns an approximation of pi. + + + + +echo pi(); +// echo's 3.1415926535898 + + + +
[PHP-DOC] cvs: phpdoc /en/functions math.xml
danbeck Tue Jun 26 22:42:17 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: number_format: - added optional tags to optional parameters - tweaked and added more examples - moved example description under example block - added "See also:" section - removed several manual annotations that were no longer needed because of these changes Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.31 phpdoc/en/functions/math.xml:1.32 --- phpdoc/en/functions/math.xml:1.31 Sat Jun 23 22:10:51 2001 +++ phpdoc/en/functions/math.xmlTue Jun 26 22:42:17 2001 @@ -832,9 +832,9 @@ string number_format float number - int decimals - string dec_point - string thousands_sep + int decimals + string +dec_point + string +thousands_sep @@ -860,23 +860,44 @@ a comma (",") between every group of thousands. - For instance, French notation usually use two decimals, - comma (',') as decimal separator, and space (' ') as - thousand separator. This is achieved with this line : - + + number_format Example + + For instance, French notation usually use two decimals, + comma (',') as decimal separator, and space (' ') as + thousand separator. This is achieved with this line : + - + + + + See also: sprintf, + printf, sscanf and + fprintf. + +
[PHP-DOC] cvs: phpdoc /en/functions math.xml
damsMon May 21 03:47:44 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Added details to pow from PHP-note. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.27 phpdoc/en/functions/math.xml:1.28 --- phpdoc/en/functions/math.xml:1.27 Wed May 16 11:33:21 2001 +++ phpdoc/en/functions/math.xmlMon May 21 03:47:43 2001 @@ -923,7 +923,9 @@ - Returns base raised to the power of exp. + Returns base raised to the power of + exp. If this can't be computed, + exp will return NAN. See also exp.
[PHP-DOC] cvs: phpdoc /en/functions math.xml
damsMon May 7 02:13:27 2001 EDT Modified files: /phpdoc/en/functionsmath.xml Log: Added example with number_format.Any other useful format may be added... Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.25 phpdoc/en/functions/math.xml:1.26 --- phpdoc/en/functions/math.xml:1.25 Sat May 5 22:22:48 2001 +++ phpdoc/en/functions/math.xmlMon May 7 02:13:26 2001 @@ -842,6 +842,24 @@ the decimals and thousands_sep instead of a comma (",") between every group of thousands. + + For instance, French notation usually use two decimals, + comma (',') as decimal separator, and space (' ') as + thousand separator. This is achieved with this line : + + + + + +
[PHP-DOC] cvs: phpdoc /en/functions math.xml /ja/functions imap.xml math.xml oci8.xml pcre.xml pgsql.xml
hirokawaSat May 5 22:22:49 2001 EDT Modified files: /phpdoc/en/functionsmath.xml /phpdoc/ja/functionsimap.xml math.xml oci8.xml pcre.xml pgsql.xml Log: fixed a typo and update translations. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.24 phpdoc/en/functions/math.xml:1.25 --- phpdoc/en/functions/math.xml:1.24 Tue May 1 09:20:51 2001 +++ phpdoc/en/functions/math.xmlSat May 5 22:22:48 2001 @@ -491,7 +491,7 @@ Returns the next lowest integer value by rounding down value if neccessary. - The return value of ceil is still of type + The return value of floor is still of type float as the value range of float is usually bigger than that of int. Index: phpdoc/ja/functions/imap.xml diff -u phpdoc/ja/functions/imap.xml:1.19 phpdoc/ja/functions/imap.xml:1.20 --- phpdoc/ja/functions/imap.xml:1.19 Fri Apr 27 19:20:55 2001 +++ phpdoc/ja/functions/imap.xmlSat May 5 22:22:49 2001 @@ -1760,7 +1760,7 @@ 説明 - array imap_header_decode + array imap_mime_header_decode string text Index: phpdoc/ja/functions/math.xml diff -u phpdoc/ja/functions/math.xml:1.16 phpdoc/ja/functions/math.xml:1.17 --- phpdoc/ja/functions/math.xml:1.16 Sun Jan 7 17:39:30 2001 +++ phpdoc/ja/functions/math.xmlSat May 5 22:22:49 2001 @@ -138,8 +138,10 @@ - numberの絶対値を返します。引数numberがfloatの場合はfloat、その他 - の場合はintを返します。 + numberの絶対値を返します。引数numberがfloatの場合は + 帰り値もfloatとなり、その他の場合は、 + intを返します。(これは、floatの範囲は、 + intよりも広いためです。) @@ -311,27 +313,16 @@ 説明 - int ceil - float number + float ceil + float value - - number の次に大きい整数を返します。整数に - ceil を使うことは全くの時間の無駄です。 - - -$x = ceil(4.25); -// which would make $x=5 - - - - - - PHP/FI 2 での ceil は浮動小数 (float) を返 - しました。$new = (double)ceil($number);とする - ことで従来と同じ結果を得ることが出来ます。 - - + + valueの次に大きい整数値を返します。 + ceilの返り値は、float型となりま + す。これは、float値の範囲は通常intより + も広いためです。 + floor と round も参照 下さい。 @@ -456,7 +447,7 @@ -Exp +exp 自然対数 e の累乗を計算します @@ -478,29 +469,23 @@ -Floor +floor 切捨て 説明 - int floor - float number + float floor + float value - number から最も近い最小の整数の値を返しま - す。整数値に floor を使うことは全くの時間の - 無駄です。 + +valueから最も近い最小の整数の値を返します。 + floorの返り値は、float型のまま + となります。これは、floatの範囲はintよ + りも広いためです。 - - - PHP/FI 2 での floorは浮動点整数値を返します。 - $new = (double)floor($number); のようにするこ - とで従来と同じ結果を得られます。 - - ceil と round も参照下 さい。 Index: phpdoc/ja/functions/oci8.xml diff -u phpdoc/ja/functions/oci8.xml:1.12 phpdoc/ja/functions/oci8.xml:1.13 --- phpdoc/ja/functions/oci8.xml:1.12 Fri Mar 9 07:33:03 2001 +++ phpdoc/ja/functions/oci8.xmlSat May 5 22:22:49 2001 @@ -1558,16 +1558,16 @@ - OCINumCols, OCIColumnName, + OCINumCols, OCIColumnName, OCIColumnSize も参照下さい。 - + OCIParse -クエリーを処理し、文を返す + +クエリーをパースし、ステートメントを返す 説明 @@ -1575,18 +1575,18 @@ int OCIParse int conn - strint query + string query OCIParseは、connを - 使用してqueryを処理します。クエリーが有効 - な場合にステートメントID、無効な場合にfalseを返します。 + +使用してqueryをパースします。クエリーが有 + +効な場合にステートメントID、無効な場合にfalseを返します。 queryは、有効なSQL文である必要があります。 - - - + + + OCIError Index: phpdoc/ja/functions/pcre.xml diff -u phpdoc/ja/functions/pcre.xml:1.20 phpdoc/ja/functions/pcre.xml:1.21 --- phpdoc/ja/functions/pcre.xml:1.20 Thu Mar 15 04:22:10 2001 +++ phpdoc/ja/functions/pcre.xmlSat May 5 22:22:49 2001 @@ -714,7 +714,7 @@ 場合でも)単一の行からなるとして処理します。 "行頭"メタ文字 (^) は文字列の最初にしかマッチしません。 一方、"行の終端"メタ文字 ($) は文字列の終わりまたは - (E 修飾子が設定されていない場合、) + (D 修飾子が設定されていない場合、) 終端を表す改行記号の前のみにしかマッチしません。 この動作は Perl と同じです。 Index: phpdoc/ja/functions/pgsql.xml diff -u phpdoc/ja/functions/pgsql.xml:1.22 phpdoc/ja/functions/pgsql.xml:1.23 --- phpdoc/ja/functions/pgsql.xml:1.22 Sat May 5 21:54:00 2001 +++ phpdoc/ja/functions/pgsql.xml Sat May 5 22:22:49 2001 @@ -36,12 +36,13 @@ - postmaster & + postmaster & pg_connect("dbname=MyDbName"); OK - postmaster -i & + postmaster -i & + pg_connect("dbname=MyDbName"); OK @@ -174,11 +175,32 @@ pg_connect -コネクションを開く +PostgreSQLコネクションを開く 説明 + + int pg_connect + string host + string port + string dbname + + + int pg_con
Re: [PHP-DOC] cvs: phpdoc /en/functions math.xml pgsql.xml session.xml strings.xml
Hi Hartmut, Hartmut Holzgraefe wrote: > > hholzgraTue May 1 09:20:52 2001 EDT > > Modified files: > /phpdoc/en/functionsmath.xml pgsql.xml session.xml strings.xml > Log: > floor/ceil return type was not up to the code There are some characters (and maybe whole paragraphs?) in session.xml and strings.xml, that obviously don't belong there. Probably they were added by cvs due to a version conflict. Could you please check this? Cheers, Martin
[PHP-DOC] cvs: phpdoc /en/functions math.xml pgsql.xml session.xml strings.xml
hholzgraTue May 1 09:20:52 2001 EDT Modified files: /phpdoc/en/functionsmath.xml pgsql.xml session.xml strings.xml Log: floor/ceil return type was not up to the code Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.23 phpdoc/en/functions/math.xml:1.24 --- phpdoc/en/functions/math.xml:1.23 Fri Jan 5 09:35:57 2001 +++ phpdoc/en/functions/math.xmlTue May 1 09:20:51 2001 @@ -138,7 +138,9 @@ Returns the absolute value of number. If the argument number is - float, return type is also float, otherwise it is int. + of type float, the return type is also float, + otherwise it is int (as float usually has a + bigger value range than int). @@ -314,25 +316,16 @@ Description - int ceil - float number + float ceil + float value - - Returns the next highest integer value from - number. Using ceil - on integers is absolutely a waste of time. - - -$x = ceil(4.25); -// which would make $x=5 - - - - NOTE: PHP/FI 2's ceil returned a - float. Use: $new = (double)ceil($number); to - get the old behaviour. + Returns the next highest integer value by rounding up + value if necessary. + The return value of ceil is still of type + float as the value range of float is + usually bigger than that of int. See also floor and @@ -491,19 +484,16 @@ Description - int floor - float number + float floor + float value - - Returns the next lowest integer value from - number. Using floor - on integers is absolutely a waste of time. - - NOTE: PHP/FI 2's floor returned a - float. Use: $new = (double)floor($number); to - get the old behaviour. + Returns the next lowest integer value by rounding down + value if neccessary. + The return value of ceil is still of type + float as the value range of float is + usually bigger than that of int. See also ceil and @@ -1026,12 +1016,12 @@ - - - The precision parameter is only - available in PHP 4. - - + + + The precision parameter is only + available in PHP 4. + + See also ceil and floor. Index: phpdoc/en/functions/pgsql.xml diff -u phpdoc/en/functions/pgsql.xml:1.30 phpdoc/en/functions/pgsql.xml:1.31 --- phpdoc/en/functions/pgsql.xml:1.30 Sat Feb 24 17:20:18 2001 +++ phpdoc/en/functions/pgsql.xml Tue May 1 09:20:51 2001 @@ -40,6 +40,7 @@ postmaster -i & + pg_connect("dbname=MyDbName"); OK @@ -171,6 +172,27 @@ Description + + int pg_connect + string host + string port + string dbname + + + int pg_connect + string host + string port + string options + string dbname + + + int pg_connect + string host + string port + string options + string tty + string dbname + int pg_connect string conn_string Index: phpdoc/en/functions/session.xml diff -u phpdoc/en/functions/session.xml:1.35 phpdoc/en/functions/session.xml:1.36 --- phpdoc/en/functions/session.xml:1.35Fri Mar 16 22:38:25 2001 +++ phpdoc/en/functions/session.xml Tue May 1 09:20:51 2001 @@ -136,6 +136,8 @@ The following example demonstrates how to register a variable, and how to link correctly to another page using SID. + + Counting the number of hits of a single user @@ -147,17 +149,94 @@ Hello visitor, you have seen this page times.
is necessary to preserve the session id +# the is necessary to preserve the session id # in the case that the user has disabled cookies ?> -To continue, click here +To continue, click here +To implement database storage you need PHP code and a user level +function session_set_save_handler. You would +have to extend the following functions to cover MySQL or another +database. + + +<<< session.xml + + + Usage of session_set_save_handler + + +>> 1.19 +return "foo|i:1;"; +} + +function write ($key, $val) { +echo "write ($key, $val)\n"; +return true; +}