Skip to content

derickr/extension-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published

Contributors 3

  •  
  •  
  •