~$ php -v
PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.14, Copyright (c), by Zend Technologies
~$ apt list --installed | grep php
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libapache2-mod-php8.1/jammy-updates,jammy-security,now 8.1.2-1ubuntu2.14 amd64 [installed,automatic]
libapache2-mod-php/jammy,jammy,now 2:8.1+92ubuntu1 all [installed]
php-common/jammy,jammy,now 2:92ubuntu1 all [installed,automatic]
php-mysql/jammy,jammy,now 2:8.1+92ubuntu1 all [installed]
php8.1-cli/jammy-updates,jammy-security,now 8.1.2-1ubuntu2.14 amd64 [installed,automatic]
php8.1-common/jammy-updates,jammy-security,now 8.1.2-1ubuntu2.14 amd64 [installed,automatic]
php8.1-mysql/jammy-updates,jammy-security,now 8.1.2-1ubuntu2.14 amd64 [installed,automatic]
php8.1-opcache/jammy-updates,jammy-security,now 8.1.2-1ubuntu2.14 amd64 [installed,automatic]
php8.1-readline/jammy-updates,jammy-security,now 8.1.2-1ubuntu2.14 amd64 [installed,automatic]
php8.1/jammy-updates,jammy-updates,jammy-security,jammy-security,now 8.1.2-1ubuntu2.14 all [installed,automatic]
php/jammy,jammy,now 2:8.1+92ubuntu1 all [installed]