[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@localhost ~]#
[root@localhost ~]# rpm -qa |grep php
php-5.4.16-36.el7_1.x86_64
php-common-5.4.16-36.el7_1.x86_64
php-mysql-5.4.16-36.el7_1.x86_64
php-cli-5.4.16-36.el7_1.x86_64
php-pdo-5.4.16-36.el7_1.x86_64
[root@localhost ~]#
lake@localhost:~$ php -v
PHP 5.4.16 (cli) (built: Jun 10 2015 04:34:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
lake@localhost:~$ which php
/usr/bin/php
lake@localhost:~$ rpm -qf /usr/bin/php
php-cli-5.4.16-36.el7_1.x86_64
lake@localhost:~$
lake@localhost:~/php$ cat index.php
echo "<?php echo "the 1st test page \r\n"; phpinfo(); ?>"
lake@localhost:~/php$
### command line test
lake@localhost:~/php$ php index.php
echo "the 1st test page
PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/lake/php/index.php on line 1
phpinfo()
PHP Version => 5.4.16
System => Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64
Build Date => Jun 10 2015 04:34:11
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/json.ini,
/etc/php.d/mysql.ini,
..............
###### web test in Apache httpd web server
lake@localhost:~/php$ sudo cp index.php /var/www/html/
visit : https://localhost/index.php
http://localhost/index.php
echo "the 1st test page
PHP Logo
PHP Version 5.4.16
............