aterrien / forp
Wrapper for forp PHP profiler extension.
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/aterrien/forp
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-21 07:32:55 UTC
README
forp-php is a composer package that "simplifies" usage of forp PHP profiler on your application.
What it does :
- it starts forp PHP profiler.
- it registers the forp output callback on shutdown of the PHP script.
- it selects the most appropriate response to the client.
Dependencies
Server-side :
- forp-PHP-profiler : must be installed on your server
Client-side :
- forp-chrome : Chrome client for Chrome users
OR
- forp-ui : forp.min.js must be put on your own CDN
API = start($opts)
With $opts :
array( 'no_internals' => 1, // enable/disable collect of PHP internals 'ui_src' => '<your forp-ui cdn>', // URL of forp-ui forp.min.js on your CDN @link https://github.com/aterrien/forp-ui/ 'flags' => self::FLAG_ALL, // forp flags @link https://github.com/aterrien/forp-PHP-profiler/#forp_start-flags )
Example :
// if($theCurrentRequestCanProfileTheCurrentScript) { $Forp = new Forp\Forp(array( 'ui_src' => '<your forp-ui cdn>', )); $Forp->start(); // }
It can be done in an auto-prepend-file.
Install
Just add this package to the requires of your project (composer.json):
{
"require":{
"aterrien/forp": "dev-master"
}
}
Don't forget to run the install command.