<commit_before>Installation
============

PHP extensions require a slightly different installation method to a traditional
PHP-based library or framework. You can either download a binary package for the
system of your choice or build it from the sources.

Linux/Solaris
-------------

On a Linux/Solaris system you can easily compile and install the extension from the source code:

Requirements
^^^^^^^^^^^^

Prerequisite packages are:

* PHP >= 5.4 development resources
* GCC compiler (Linux/Solaris)
* Git (if not already installed in your system - unless you download the package from GitHub and upload it on your server via FTP/SFTP)
* `Zephir`_ >= 0.9.3a-dev

Specific packages for common platforms:

.. code-block:: bash

    # Ubuntu
    sudo apt-get install php5-dev gcc make

    # Suse
    sudo yast -i php5-devel gcc make autoconf

    # CentOS/RedHat/Fedora
    sudo yum install php-devel gcc make

    # Solaris
    pkg install php-54 apache-php54 gcc-45

Of course, you need to install PHP development headers and tools appropriate for your current PHP version.

Compilation
^^^^^^^^^^^

Creating the extension:

.. code-block:: bash
<commit_msg>Updated docs [ci skip]<commit_after>Installation
============

PHP extensions require a slightly different installation method to a traditional
PHP-based library or framework. You can either download a binary package for the
system of your choice or build it from the sources.

Linux/Solaris
-------------

On a Linux/Solaris system you can easily compile and install the extension from the source code:

Requirements
^^^^^^^^^^^^

Prerequisite packages are:

* PHP >= 5.4 development resources
* GCC compiler (Linux/Solaris)
* Git (if not already installed in your system - unless you download the package from GitHub and upload it on your server via FTP/SFTP)
* `Zephir`_ >= 0.9.4a-dev

Specific packages for common platforms:

.. code-block:: bash

    # Ubuntu
    sudo apt-get install php5-dev gcc make

    # Suse
    sudo yast -i php5-devel gcc make autoconf

    # CentOS/RedHat/Fedora
    sudo yum install php-devel gcc make

    # Solaris
    pkg install php-54 apache-php54 gcc-45

Of course, you need to install PHP development headers and tools appropriate for your current PHP version.

Compilation
^^^^^^^^^^^

Creating the extension:

.. code-block:: bash

{'fraction_non_alphanumeric': 0.09250535331905782, 'fraction_numerical': 0.01113490364025696, 'mean_word_length': 3.5803921568627453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4594920', 'n_tokens_mistral': 706, 'n_tokens_neox': 632, 'n_words': 295}