fork(1) download
  1. <?php
  2. $result="Это палиндром";
  3. $badresult="Это непалиндром";
  4. $text="abba";
  5. $text_ln = mb_strlen($text);
  6. $check_text="";
  7. for($i=$text_ln;$i>=0;$i--){
  8. $check_text += $text[i];
  9. }
  10. if ($text == $check_text){
  11. echo $result;
  12. } else {
  13. echo $badresult;
  14. }
  15. ?>
Success #stdin #stdout #stderr 0.03s 52480KB
stdin
Standard input is empty
stdout
Это палиндром
stderr
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/uvyqKY/prog.php on line 9
PHP Warning:  Illegal string offset 'i' in /home/uvyqKY/prog.php on line 9
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/uvyqKY/prog.php on line 9
PHP Warning:  Illegal string offset 'i' in /home/uvyqKY/prog.php on line 9
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/uvyqKY/prog.php on line 9
PHP Warning:  Illegal string offset 'i' in /home/uvyqKY/prog.php on line 9
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/uvyqKY/prog.php on line 9
PHP Warning:  Illegal string offset 'i' in /home/uvyqKY/prog.php on line 9
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/uvyqKY/prog.php on line 9
PHP Warning:  Illegal string offset 'i' in /home/uvyqKY/prog.php on line 9