- var_dump: documentation ( source)
- preg_replace: documentation ( source)
<?php
var_dump(preg_replace('/@@SOMEPHENTITY@@/', 'XXSOMEPHENTITY@@', 'This sentence includes both @@SOMEPHENTITY@@ and XXSOMEPHENTITY@@ but only the replacement will show up in double'));