<?php
preg_match('/(foo)(bar)(baz)/', 'foobarbaz', $matches, PREG_OFFSET_CAPTURE);
print_r($matches);
?>
<?php
if(!is_int(my_price_replace($price, $product))) {
$text = "<div class='no-price' style='display:block;'>Текст пояснения</div>";
} else {
$text = "<div class="no-price" style="display:none;">Текст пояснения</div>";
}
?>
<?php
if(isset($_POST['form1'])) print $form2; // где $form2 это <form><input type="hidden" name="form2"><input type=submit></form>
$html = <<< HTML
<div class="{$object["class"]}"></div>
HTML;
$class = $object['class'];
$string = "<div class='{$class}'></div>";
function sendPostInstant(string $url, string $postfields)
{
$ch = self::init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 1000);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_exec($ch);
self::close($ch);
}
$result = sendPostInstant('путь к вашему скрипту', '');
header('Content-Type: text/html; charset=utf-8');
<meta charset="utf-8" />