3v4l.org

run code in 300+ PHP versions simultaneously
<?php $your_variable = '[section title="This is the title"]'; $your_variable = str_replace('type="full" type="wrapper"]','type="full"]',preg_replace ( '/\[section([^\]]+)(?!type)\]/i' , '[section$1 type="wrapper"]' , $your_variable )); echo "First try: ".$your_variable."\n";

preferences:
35.38 ms | 402 KiB | 5 Q