3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "aaaaaaaaaaaaaaaababababababababa"; while(strpos($a, "aa") ||strpos($a, "ba")) { $a = str_replace(array("aa", "ba"), "a", $a); } echo $a;
based on AfqMu
Output for 4.3.0 - 7.1.0
aaaaaaaaaaaaaaaa