getNumberOfParameters() > 0 || $functionReflection->hasReturnType() ? "\n\n - Parameters [%d] {%s\n }" : ''; $returnTypeFormat = $functionReflection->hasReturnType() ? "\n - Return [ %s ]" : ''; $string = sprintf( 'Function [ <%s> function %s ] {%s' . $parametersFormat . $returnTypeFormat . "\n}", self::sourceToString($functionReflection), $functionReflection->getName(), self::fileAndLinesToString($functionReflection), count($functionReflection->getParameters()), self::parametersToString($functionReflection), self::returnTypeToString($functionReflection), ); assert($string !== ''); return $string; } /** @psalm-pure */ private static function sourceToString(ReflectionFunction $functionReflection): string { if ($functionReflection->isUserDefined()) { return 'user'; } $extensionName = $functionReflection->getExtensionName(); assert(is_string($extensionName)); return sprintf('internal:%s', $extensionName); } /** @psalm-pure */ private static function fileAndLinesToString(ReflectionFunction $functionReflection): string { if ($functionReflection->isInternal()) { return ''; } $fileName = $functionReflection->getFileName(); if ($fileName === null) { return ''; } return sprintf("\n @@ %s %d - %d", $fileName, $functionReflection->getStartLine(), $functionReflection->getEndLine()); } /** @psalm-pure */ private static function parametersToString(ReflectionFunction $functionReflection): string { return array_reduce($functionReflection->getParameters(), static fn (string $string, ReflectionParameter $parameterReflection): string => $string . "\n " . ReflectionParameterStringCast::toString($parameterReflection), ''); } /** @psalm-pure */ private static function returnTypeToString(ReflectionFunction $methodReflection): string { $type = $methodReflection->getReturnType(); if ($type === null) { return ''; } return ReflectionTypeStringCast::toString($type); } } __halt_compiler();----SIGNATURE:----x/oyURkfshy09ekJGY9s4BZ6UpuVQKeecjUm2yZxo4IUc3yP8ssgg+mJRT0D6MIB7KOwDzAr1Yy/x9AaMeKnwtopdU5lxGe9aNUy2ho/RU9aFHXaUC1HHUvFzXSggu72s83bNWGld0rynL/cIFRi3CvSPUbv+qwc0fKgc0K+U52fMzkUF0dmD6pTTC+iEBYDKXTrQRlNPpUQ+N/XF4BLj9YUYha/yw+gtFw1lFuN4T+UCL/mI4dgnYoSeUKHnaUowc6uRN5SI72LI4qcHyJ47BLMGAI2bQX9f5dUOL9vwlViK57V3xGvDUkcVIhLH+dvJoZw53x/e47CiuiBcp+C+c53HkaVXgzbLvRNT5eDPYd4KrkVTpmS4QAtj2ICa0opzlF+HVMDYN8b3DtgnN+zqxNDzHNWhoocCq3cbBQCACsXKs0qptY5FbpJhmIExqwR7m5j4TOuB7+eNiVn9pfQ0iPqZQevGKRMmeqQA5jpEii5vcnAwRj5S3YWSZZDQZuqm1/W5AdqYKzvbYH/gvFW9ZgxFcpdXEW8ufxdpm6ln2FFuy81CV9nrLpz4Rpyl6FkdnBZl6L6/9sGpgp0OwxvRsS5/fRrI+98BD6/0KVLzLTgUMN1V30fsambCNo8rjd+whvHH/ZtYP1A/Ly2/0NTqwr6sPP+lPs0xQr0aWBB+vs=----ATTACHMENT:----OTY2NDYwNDA0MzMwNTc4OCAxMDUyMzU4OTA2ODgzMjk4IDk2OTUxNTEwNjkzOTkyMw==