PHP Fatal error: Uncaught Error: Undefined constant "MB_OVERLOAD_STRING"

I can’t check Mautic version now as the console -V command (and all other send commands only gives this error:

/var/www/mautic/app/console -V
PHP Fatal error: Uncaught Error: Undefined constant “MB_OVERLOAD_STRING” in /var/www/mautic/vendor/joomla/string/src/phputf8/utf8.php:38
Stack trace:
#0 /var/www/mautic/vendor/composer/autoload_real.php(66): require()
#1 /var/www/mautic/vendor/composer/autoload_real.php(56): composerRequire4c0a51d117c43ccbd70a0cd87363dc1f()
#2 /var/www/mautic/vendor/autoload.php(7): ComposerAutoloaderInit4c0a51d117c43ccbd70a0cd87363dc1f::getLoader()
#3 /var/www/mautic/app/autoload.php(15): require(’…’)
#4 /var/www/mautic/app/console(19): require_once(’…’)
#5 {main}
thrown in /var/www/mautic/vendor/joomla/string/src/phputf8/utf8.php on line 38

PHP version: is 7.2

I haven’t updated Mautic in a long time, but still running same configuration, same php 7.2 as before. However the php7.2 might have been update automatically.
Any advice how I can avoid this to at least get the current mail queue sent, so that I can look into updating Mautic?

Thanks!

I found the solution. When I run the commands from CLI the PHP version is 8.1, even though I use PHP7.2 for mautic.
Running the commands with php7.2 console -V etc doesn’t cause the error.