Ubuntu 22.04
Sponsored Link

PHP 8.1 : Install2022/05/09

 
Install PHP.
[1] Install PHP 8.1.
root@www:~#
apt -y install php8.1 php8.1-mbstring php-pear
root@www:~#
php -v

PHP 8.1.2 (cli) (built: Apr  7 2022 17:46:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies

# verify installation to create a test script

root@www:~#
echo '<?php echo `php -i`."\n"; ?>' > php_test.php

root@www:~#
php php_test.php | head

phpinfo()
PHP Version => 8.1.2

System => Linux dlp.srv.world 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Build Date => Apr  7 2022 17:46:26
Build System => Linux
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/8.1/cli
Loaded Configuration File => /etc/php/8.1/cli/php.ini
Matched Content