EDIT: https://github.com/aercolino/ando-php
This is an update on my Regex class of some days ago.
{[ .class-regex | 1.hilite(=php=) ]}
Now with a bunch of tests.
{[ .tests-regex | 1.hilite(=php=) ]}
(previous permalink: class-regex-for-php)
Andrea Ercolino, Software Engineer
EDIT: https://github.com/aercolino/ando-php
This is an update on my Regex class of some days ago.
{[ .class-regex | 1.hilite(=php=) ]}
Now with a bunch of tests.
{[ .tests-regex | 1.hilite(=php=) ]}
(previous permalink: class-regex-for-php)
EDIT: https://github.com/aercolino/ando-php
This is a simple class for creating generic callbacks in PHP. There are a couple of reasons for using this class instead of the usual ´array( $container, $function )´ method.
First, the usual method doesn’t allow you to run the called code with more arguments than those provided by the calling code.
Second, this class resolves to the usual method when no extra arguments are provided, thus making it transparent at run time. This could seem useless, but, for free, we get much easier to spot callback calling points.
{[ .class-func | 1.hilite(=php=) ]}
Here are some tests.
{[ .tests | 1.hilite(=php=) ]}
(previous permalink: class-func-for-php)
First install phpunit.phar locally:
$ brew update Updated Homebrew from b1001942 to 3a44ae38. ... $ brew install phpunit ==> Installing phpunit from homebrew/homebrew-php ==> Downloading https://phar.phpunit.de/phpunit-4.3.4.phar ######################################################################## 100,0% 🍺 /usr/local/Cellar/phpunit/4.3.4: 3 files, 3,2M, built in 3 seconds
Then right-click on the External Libraries entry in the Project pane and choose Configure PHP include paths…
Then add an include path to the folder where phpunit.phar is installed:
And finally you get all completions: