OrdSingleByteRector

Replace ord($str) with ord($str[0])

-echo ord('abc');
+echo ord('a');

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php85\Rector\FuncCall\OrdSingleByteRector;

return RectorConfig::configure()
    ->withRules([
        OrdSingleByteRector::class,
    ]);
SETS:  PHP 8.5