3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s='<?php $s=4; echo str_replace(2+2,chr(39).$s.chr(39),$s); ?>'; echo str_replace(2+2,chr(39).$s.chr(39),$s); echo 34; ?>
based on kJije
Output for 4.3.0 - 7.2.0
<?php $s='<?php $s=4; echo str_replace(2+2,chr(39).$s.chr(39),$s); ?>'; echo str_replace(2+2,chr(39).$s.chr(39),$s); ?>34