Aula3_op_ar - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of Aula3_op_ar.php

  1. <?php 
  2.  
  3.     $var1 = 98000;
  4.     $var2 = 2.60;
  5.     
  6.     echo "Valor absoluto da prierira variavel : " .abs($var1)."\n";
  7.     echo "Potenciação: " .pow($var1,$var2)."\n";
  8.     echo "Raiz quadrada: " .sqrt($var1). "\n";
  9.     echo "$var2 arredondado fica".round($var2)."\n";
  10.     echo "$var2 apenas co sua parte inteira fica ".intval($var2)."\n";
  11.     echo "Formatando $var1 para moeda: ".number_format($var1,2,",",".")."\n";
  12.     
  13.     echo "Fim das funções basicas para operadores aritimeticos!";
  14.  
  15. ?> 
  16.  
File Description
  • Aula3_op_ar
  • PHP Code
  • 04 Sep-2019
  • 496 Bytes
You can Share it: