Mine
public text v1 · immutable<?php
$string = '<a href="http://www.google.com">Google</a>';
$rand = rand();
$text = str_replace('href=', $rand, $string);
$text = str_replace('>', $rand, $string);
$explode = explode($rand, $text);
$text = $explode[1];
$text = str_replace("'", "", $text);
$text = str_replace('"', '', $text);
echo $text;
?>