PHP Deep Dive

AIWAF-PHP Project Reference

Source and package versions

One AIWAF repository. Python: py/aiwaf/ · Node.js: js/ · Rust/WASM: rust/ · Java: java/. Source and canonical README. Versions shown are the latest published releases; each package is versioned independently. Current versions are aiwaf 1.1.8 (Python) and aiwaf 1.1.5 (npm), with Rust/Python 0.2.7 and WASM 0.2.5 and Java 1.3.5. Sandbox guides retain their separately pinned builds.

Comprehensive reference and setup path for integrating aiwaf-php in real PHP applications.

Runtime
PHP >= 7.4
Package Manager
Composer
Primary Setup Command
php setup.php
Training Command
php cli/detect_and_train.php

Scope

  • Environment prerequisites and installation.
  • Integration patterns for plain PHP, Laravel, Symfony, and WordPress style bootstraps.
  • Baseline and production configuration controls.
  • Storage/backend selection and training workflow.
  • Troubleshooting and validation playbooks.

Integration Targets

Plain PHP

Front-controller early bootstrap with AIWAF::protect().

Laravel

Service provider patterns and route-awareness resolver hooks.

Symfony

Router-backed path resolver integration for known-route awareness.

WordPress

MU-plugin bootstrap and WP-CLI oriented operational workflow.

Runtime Artifacts

  • resources/blocked_ips.json
  • resources/dynamic_keywords.json
  • resources/request_features.csv
  • resources/forest_model.json

Start Here

Setup Guide includes end-to-end installation, integration examples, backend options, training, validation, and troubleshooting.

Architecture covers runtime flow, core modules, storage strategy, and training lifecycle internals.

Operations covers command surface, config layering, test workflows, packaging, and operational notes.