The simplest way to test your PHP installation is to create a small test script that uses the phpinfo() function. This function will produce a long list of configuration information. Open a text editor and type the following line:
<?php phpinfo(); ?>
Save this file as phpinfo.php and place it in the document root of your web serverthe htdocs subdirectory of your Apache installation, or the /Library/WebServer/Documents directory on Mac OS X. Access this file using your web browser, and you should see something like what is shown in Figure 4.4.
Figure 4.4. The results of phpinfo().
The exact output of phpinfo() depends on your operating system, PHP version, and configuration options.