Installation

Requirements

Before installing PivotPHP v1.1.4, make sure your system meets the following requirements:

  • PHP 8.1 or higher (8.4+ recommended for array callable syntax)
  • Composer (latest version recommended)
  • ext-json PHP extension
  • ext-mbstring PHP extension
  • Optional: Docker for containerized deployment

Performance Highlights

  • πŸš€ Peak Performance: 84,998 ops/sec (application creation)
  • ⚑ ReactPHP Extension: 19,707 req/sec (continuous runtime)
  • 🎯 Core Performance: 2,122 req/sec Peak (Docker validated v1.2.0)
  • πŸ’« Memory Efficiency: Ultra-efficient 1.61MB footprint
  • πŸ† Market Position: #1 with ReactPHP extension

Install via Composer

The recommended way to install PivotPHP v1.1.4 is through Composer:

# Core framework (2,122 req/sec peak v1.2.0)
composer require pivotphp/core

# Optional: ReactPHP extension (19,707 req/sec)
composer require pivotphp/reactphp

# Optional: Cycle ORM extension (457,870 ops/sec)
composer require pivotphp/cycle-orm

Create a New Project

To create a new PivotPHP project, you’ll need to set it up manually:

Note: A project template is in development and will be available soon via composer create-project.

# Create a new directory for your project
mkdir my-app
cd my-app

# Initialize composer
composer init

# Install PivotPHP
composer require pivotphp/core

# Create the basic structure
mkdir -p public src/{Controllers,Middleware,Providers} config tests
touch public/index.php

This will create a basic project structure:

my-app/
β”œβ”€β”€ public/
β”‚   └── index.php
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Controllers/
β”‚   β”œβ”€β”€ Middleware/
β”‚   └── Providers/
β”œβ”€β”€ config/
β”œβ”€β”€ tests/
β”œβ”€β”€ vendor/
β”œβ”€β”€ composer.json
└── composer.lock

Manual Installation

For more control over your project setup:

  1. Create a new directory for your project
  2. Initialize Composer:
    composer init
    
  3. Require PivotPHP:
    composer require pivotphp/core
    
  4. Create your entry point:
    mkdir public
    touch public/index.php
    

Verify Installation

To verify that PivotPHP is installed correctly, create a simple index.php file:

<?php
require __DIR__ . '/../vendor/autoload.php';

use PivotPHP\Core\Core\Application;

$app = new Application();

$app->get('/', function($request, $response) {
    return $response->json([
        'message' => 'PivotPHP v1.1.4 is running!',
        'version' => Application::VERSION,
        'edition' => 'Architectural Excellence & Performance Optimization',
        'performance' => [
            'peak_ops_sec' => 84998,
            'core_req_sec' => 2122,
            'reactphp_req_sec' => 19707
        ],
        'features' => [
            'array_callable' => 'PHP 8.4+ compatible',
            'object_pooling' => '100% Request reuse',
            'json_optimization' => 'Automatic buffer pooling',
            'psr_compliance' => 'PSR-7, PSR-15, PSR-12'
        ]
    ]);
});

$app->run();

Then start the built-in PHP server:

php -S localhost:8000 -t public

Visit http://localhost:8000 in your browser. You should see a JSON response confirming PivotPHP is running.

Next Steps

Now that you have PivotPHP v1.1.4 installed, you’re ready to build high-performance applications!

Getting Started

High-Performance Extensions

Production Deployment