<?php

echo str_replace('=', '&#61;', htmlentities("This is my test and it = this"));