Simple PHP Article Spinning Syntax Project

I need a PHP script/function where i can pass in a search string, a replacement string and a article with nested spinning syntax. The function will then make replacements in the article in a single location where the search string is found in every possible variation of a top level spinning block. If there are multiple replacement in a variation sentence, then replace the first occurrence only. If there are no replacements possible in the entire article, return a blank string.

E.g. 1

Replace "Search string" with "Replacement string"

{Search string {Search string i am to replace|Search string and again Search string|Search string to replace}|Search string}

Since "Search string" is in every possible outcome, we can make the replacement. The output string would be

{Replacement string {Replacement string i am to replace|Replacement string and again Search string|Replacement string to replace}|Replacement string}

E.g. 2

Replace "Search string" with "Replacement string"

{Search string {No string here|Search string and again Search string|Search string to replace}|Search string}

Since the "Search string" is not on every replacement path, no replacement can be made.

I wrote this function in and it took me around 3 hours, however my code is a bit slow. So instead of just porting it to PHP, i figured i would post the project here to see if someone else could do it better. I would like the script/function to be as fast as possible. And keep in mind that spinning blocks can be nested many levels.

My max budget is $40.

Skills: PHP, Software Architecture

See more: syntax, spinning, software search replace, simple project (30 hours, article spinning, code block project, php replacement, php script path, php search replace, software porting, php nested, top php script, php script function, sentence spinning software, nested spinning article, replacement sentence software, article syntax php, spinning sentence level, multiple string search, fast spinning sentence, simple php search script, php code function, max spinning, php simple project tracking, article spinning php

About the Employer:
( 1 review ) Istanbul, Turkey

Project ID: #3999175

5 freelancers are bidding on average $36 for this job


Professional developers in web design and development and have more than 4 years of experience in the relevant field.

$30 USD in 2 days
(20 Reviews)

I have it. Check PMB. Already done. I give you and set it.

$30 USD in 0 days
(8 Reviews)

Hello sir, I'm ready start and will provide the script for that feature/function . Kind regards.

$40 USD in 5 days
(3 Reviews)

Sir, I can do this project.

$30 USD in 0 days
(3 Reviews)

I am B. Tech + M Tech in CSE from IIT bombay. ready to start.

$50 USD in 2 days
(0 Reviews)