Skip to content

Instantly share code, notes, and snippets.

View lucionescu's full-sized avatar

Lucian Ionescu lucionescu

  • Bucharest, Romania
View GitHub Profile
@Pephers
Pephers / heredoc-function.php
Last active September 26, 2023 17:55
How to call a PHP function inside a Heredoc.
<?php
$cb = function ($fn) {
return $fn;
};
echo <<<HEREDOC
Hello, {$cb(ucfirst('world'))}
HEREDOC;