Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Latest commit

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Observer PHP 8 Extension

This is a PoC PHP 8 extension that demonstrates the observer API.

$ phpize \
&& ./configure \
--with-php-config=/path/to/php-config \
&& make
$ php -dextension=$(pwd)/modules/observer.so --ri=observer

When INI setting observer.instrument=1, the observer extension will emit a message before and after every user land function call.

Execute via

$ /path/to/sapi/cli/php \
-d extension=$(pwd)/modules/observer.so \
-d observer.instrument=1 \
-r "function foo() {return 42;} var_dump(foo());"
[BEGIN foo()]
[END foo(): int]
int(42)

About

A PoC PHP 8 extension that demonstrates the observer API

Resources

Stars

12 stars

Watchers

2 watching

Forks

Contributors

Languages