This article is an example of the mathematical techniques for getting started with PHP tutorials. Share to everyone for your reference, as follows:
demo1.php
<?php//$a = ' 5 ';//$b = 7+ $a;//echo $b; $a = ' a '; $b = 7+ $a; echo $b;? >
demo2.php
<?php $a = 10.0; Is_int--detects if the variable is an integer if (is_int ($a)) { echo ' passes '; } else{ Echo ' does not pass '; }? >
demo3.php
<?php $a = 10.0; Is_int--detects if the variable is an integer if (is_int ($a)) { echo ' passes '; } else{ Echo ' does not pass '; }? >
demo4.php
<?php //rand-produces a random integer //echo rand (0,10); echo Mt_rand (0,100); Echo Getrandmax ();//maximum number 32767 //echo mt_getrandmax ();//Maximum number 2147483647?>
demo5.php
<?php//$i = 123456789.4454;//$b = Number_format ($i, 2);//echo $b; 123,456,789.45 $i = 12378456.456789; $b = Number_format ($i, 2, ' # ', ' @ '); Echo $b;//12@378@456#46?>
demo6.php
<?php//$a = -6;//echo abs ($a)//absolute value//$b = 5.66;//echo Floor ($b),//de-rounding//echo round ($b);//Rounding Echo min (1,23,4 56,87,45,7,54);//1 the minimum value or the minimum value in the array, echo Max (1,23,456,87,45,7,54),//456 the maximum value or the maximum value in the array echo pi ();//3.14159265359 Echo Pow (2,6);//64?>
I hope this article is helpful to you in PHP programming.