rolfisub / print-key-value
A function to print key values to stdout.
1.0.1
2018-12-30 00:05 UTC
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2025-03-21 20:38:45 UTC
README
To install run:
composer require rolfisub/print-key-value
To use in your php file
use Rolfisub/PrintKeyValue/PrintKeyValue; $pkv = new PrintKeyValue(); echo $pkv->printKeyValues([ 1, 2, 3, 4, "some"=>"array", [ 1, [ "yey"=>"value" ] ] ]); /*this will output: 0:1 1:2 2:3 3:4 some:array { 0:1 { yey:value } }
Output can be customized using the constructor parameters. Please check the class constructor as a reference.
Additionally you can call the clear() method to reset the output to "".