Skip to content

Instantly share code, notes, and snippets.

View lucionescu's full-sized avatar

Lucian lucionescu

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