Ubuntu 26.04

PHP 8.5 : Install2026/05/22

 

Install PHP.

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

PHP 8.5.4 (cli) (built: Apr  1 2026 09:36:11) (NTS)
Copyright (c) The PHP Group
Built by Ubuntu
Zend Engine v4.5.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.4, 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.5.4

System => Linux dlp.srv.world 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
Build Date => Apr  1 2026 09:36:11
Build System => Linux
Build Provider => Ubuntu
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/8.5/cli
Matched Content