This happens on Civicrm for Joomla. It prevents both upgrading to Php 8 and upgrading to latest Civicrm, as doing any of these stops the cron job.
This is what I see with Civicrm 5.49.3:
$ php74 domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php -s figg.org -u cronjob -p DeveFarl0 -e Job -a execute
PHP Deprecated: Non-static method JApplication::getMenu() should not be called statically in /home/usiako1s/domains/figg.org/public_html/plugins/authentication/civicrm/civicrm.php on line 305
$ php81 domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php --help
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/usiako1s/domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php on line 265
Using the latest Civicrm, the first example (with php74) generates the string "Error", and I was not able to pinpoint where it fails (I don't speak Php).