TuskLang for
PHP
The native configuration language for TuskPHP applications. Built from the ground up for PHP developers with seamless elephant integration.
The Native PHP Configuration Language
Born in the TuskPHP ecosystem, designed for PHP developers by PHP developers.
@ Operators for PHP
Execute PHP expressions, query databases, and access superglobals directly from configuration files using powerful @ operators.
TuskQuery Integration
Native integration with TuskQuery ORM. Query your database directly from config files with full TuskPHP elephant support.
Elephant Integration
Full integration with Dumbo (logging), Heffalump (search), Kaavan (caching), and all TuskPHP elephants out of the box.
Laravel & Symfony Ready
Drop-in integration for Laravel config, Symfony parameters, and other PHP frameworks. Service providers included.
OpCache Optimization
OpCache-optimized configuration loading with built-in caching and performance monitoring for production environments.
PHPUnit Testing
Built-in PHPUnit support with test helpers, fixtures, and mocking utilities for testing configurations and @ operators.
Native PHP Power
Built specifically for TuskPHP applications. Access PHP functions, superglobals, and elephant services directly from configs.
- 🐘 TuskPHP elephant integration
- 🔍 Native TuskQuery support
- ⚡ OpCache optimization
- 🔥 Hot reload in development
- 📦 Composer package ready
# Native TuskPHP Configuration
app_name: "MyTuskApp"
debug: @env("DEBUG", false)
# Database with TuskQuery
database {
host: @env("DB_HOST", "localhost")
active_users: @TuskQuery("Users").where("active", true).count()
pool_size: active_users > 1000 ? 100 : 20
}
# Elephant services integration
logging {
level: @Dumbo.getOptimalLevel()
handlers: ["file", "database", "email"]
}
# PHP-specific features
session {
name: @php(session_name())
user_id: @session("user_id")
csrf_token: @csrf_token()
}
# Smart caching with Kaavan
cache: @Kaavan.adaptive("app_settings", "5m")
PHP Ecosystem Integration
Works seamlessly with TuskPHP elephants and popular PHP frameworks
TuskPHP
Native integration
Laravel
Config provider
Symfony
Parameter loader
CakePHP
Configuration plugin
CodeIgniter
Config library
Doctrine
DBAL integration
Get Started in Minutes
Install TuskLang for PHP and start building intelligent configurations
1 Install via Composer
2 Create your configuration
app_name: "MyTuskApp"
debug: @env("DEBUG", false)
3 Load in your PHP app
$config = TuskLang::load("config.tsk");