PHPinnacle Mure provide C# like extension classes with help of Z-Engine library.
Via Composer
$ composer require phpinnacle/mure
<?php
require __DIR__ . '/vendor/autoload.php';
class MyDate
{
public static function addDays(\DateTime $date, int $num)
{
$date->modify(sprintf('+%d days', $num));
return $date;
}
}
\PHPinnacle\Mure\ExtensionManager::init(MyDate::class);
echo (new \DateTime())->addDays(2)->format('d.m.Y');
More examples can be found in examples
directory.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.