<?php

error_reporting(-1);
mb_internal_encoding('utf-8');

$text = 'Аргентина манит негра';

$text_lower = mb_strtolower($text);
$codeTable = array(' ' => '');
$without_space = strtr($text_lower, $codeTable);
$result = "Pal";

$length = mb_strlen($text);
$half = floor($length / 2);

for ($i = 0; $i <= $half; $i++) {
	$one = mb_substr($without_space, $i, 1);
	$two = mb_substr($without_space, -$i-1, 1);
	if ($one != $two) {
		$result = 'Not pal';
		break;
	}
}

echo "$result";