PHP Programming Language

PHP Version

php -v


The PHP configuration file (php.ini) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI versions, it happens on every invocation.

There are a number of possible PHP configuration files, each for a different use:

Config For php.ini File Path
Configures the PHP module for the Apache web server.
Command Line
Configures PHP for use on the command line.
CGI Mode
Configures PHP for use with the php-cgi system.

See the list of php.ini directives.

Find the loaded ini files with:

sudo find /etc -name php.ini

Binary files location

which php

Code References

Concatenating Strings

Using arrays

// Concatenate lines with an an array to maintain line breaks.
function get_div( $content )
    $output = array();

    $output[] = '<div>';
    $output[] = $content;
    $output[] = '</div>';

    return implode("\n", $output);

// Example:
echo get_div('hello');

// Outputs:
// <div>
// hello
// </div>