es,1 - 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 es,1.php

  1. <?php
  2. $a="anena";
  3. $b=str_split($a);
  4.  
  5. for($i=0; $i<count($b);$i++)
  6.     print $b[$i];
  7.  
  8. print "\r\n";
  9.  
  10. $verifica = true;
  11. for($i=0; $i<count($b);$i++)
  12.     $verifica = $verifica && ($b[$i] == $b[count($b)-1-$i]);
  13.        
  14. if($verifica)
  15.    print "l'input è un palindromo";
  16. else
  17.     print "l'input non è un palindromo";
  18.     
  19.      ?>
  20.      
File Description
  • es,1
  • PHP Code
  • 18 Jan-2022
  • 332 Bytes
You can Share it: