3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str ="test Приходите в наш <a d>test</a> видеочат, бывший когда-то test'м.testa больше нет. Забейте на <h2>test</h3> Труконф test"; echo preg_replace('/<(?:a|h\d)[^>]*>test\K(*SKIP)(*FAIL)|test/', '<$0>', $str).PHP_EOL; echo preg_replace('/a{3}c/', '<$0>', 'aaaac');
Output for 4.4.9, 5.2.5 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
<test> Приходите в наш <a d>test</a> видеочат, бывший когда-то <test>'м.<test>a больше нет. Забейте на <h2>test</h3> Труконф <test> a<aaac>
Output for 4.3.11 - 4.4.8, 5.0.2 - 5.2.4
Warning: preg_replace(): Compilation failed: nothing to repeat at offset 23 in /in/MMfuT on line 4 a<aaac>
Output for 5.0.0 - 5.0.1
Warning: preg_replace(): Compilation failed: nothing to repeat at offset 23 in /in/MMfuT on line 4 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/MMfuT on line 4 PHP_EOLa<aaac>
Output for 4.3.10
Warning: Compilation failed: nothing to repeat at offset 23 in /in/MMfuT on line 4 a<aaac>
Output for 4.3.0 - 4.3.9
Warning: Compilation failed: nothing to repeat at offset 23 in /in/MMfuT on line 4 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/MMfuT on line 4 PHP_EOLa<aaac>