kedniko/php-parser-closure

There is no license information available for the latest version (v0.0.1) of this package.

Maintainers

Package info

github.com/kedniko/php-parser-closure

pkg:composer/kedniko/php-parser-closure

Statistics

Installs: 114

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.0.1 2023-03-31 15:29 UTC

This package is auto-updated.

Last update: 2026-02-27 22:39:42 UTC


README

Quick Start

$parser = new \Kedniko\PhpParserClosure\PhpParserClosure();

$closure = function (int $number) {
  return $number * 2;
};

$parser->parse($closure);
$code = $parser->getCode();

echo $code;
// "function (int $number) {
//   return $number * 2;
// }"

Under the hood this library uses nikic/php-parser.