This is wrapper of excelent little library php-ref. Packaged as kirby plugin. All credit goes to @digitalnature
Php-ref is nice alternative to print_r()
and var_dump()
.
Use simply as ref($var)
instead of var_dump($var)
. There is also reftext($var)
which is ref in plain text mode.
Notice: It only works if kirby is in debug mode c::set('debug', 'true')
. If you don't have kirby in debug mode, nothing will show up. This is intentional.
Both of the functions have different name from original php-ref because of name collision. Proposals for better function names are welcome. Or just rename it yourself :).
To install the plugin, please put it in the site/plugins
directory.
The plugin folder must be named kirby-ref
.
site/plugins/
kirby-ref/
kirby-ref.php
...
Link to latest version https://github.com/floriankarsten/kirby-ref/releases/latest
kirby plugin:install floriankarsten/kirby-ref
git clone https://github.com/floriankarsten/kirby-ref/releases.git kirby-ref
You can of course have it as submodule. There won't be many updates.