<?php
$original = "A string reversal";
for($i = strlen($original) - 1; $i >= 0; $i--) { $reversed[$i] = $original[$i];
}
print "Оригинал: $original" . PHP_EOL;
print "Перевернутая: $reversed" . PHP_EOL;
PD9waHAKCiRvcmlnaW5hbCA9ICJBIHN0cmluZyByZXZlcnNhbCI7Cgpmb3IoJGkgPSBzdHJsZW4oJG9yaWdpbmFsKSAtIDE7ICRpID49IDA7ICRpLS0pIHsKCSRyZXZlcnNlZFskaV0gPSAkb3JpZ2luYWxbJGldOwp9CgokcmV2ZXJzZWQgPSBpbXBsb2RlKCRyZXZlcnNlZCk7CnByaW50ICLQntGA0LjQs9C40L3QsNC7OiAkb3JpZ2luYWwiIC4gUEhQX0VPTDsKcHJpbnQgItCf0LXRgNC10LLQtdGA0L3Rg9GC0LDRjzogJHJldmVyc2VkIiAuIFBIUF9FT0w7