PHP - ob_start - 替换文本以调用函数

I have:

PHP

<?php

function first_function() {
  return "A";
}

function second_function($first, $second) {
  return $first . $second;
}

ob_start(function ($buffer) {
  return $buffer;
});

?>

HTML for example

<h1>@first_function</h1>

<h2>@second_function(A, B)</h2>

My question: How can I do this in HTML to call entered functions with ob_start();?

UPDATE

I need to replace text @first_function with <?php echo first_function(); ?> && @second_function(A, B) with <?php echo second_function("A", "B"); ?>