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:
- Create a new directory for your project
- Initialize Composer:
composer init
- Require PivotPHP:
composer require pivotphp/core
- 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
- Quick Start Guide - Build your first REST API
- Routing - Advanced routing with array callable support
- Middleware - PSR-15 compliant request processing
High-Performance Extensions
- ReactPHP Extension - Achieve 19,707 req/sec
- Cycle ORM Extension - Zero-config database
- Performance Benchmarks - Detailed performance analysis
Production Deployment
- Docker Deployment - Containerized production setup
- Configuration - Environment-specific settings
- Monitoring - Performance tracking and optimization