speed up a php script

Tamamlanmış İlan edilme: 4 yıl önce Teslim sırasında ödenir
Tamamlanmış Teslim sırasında ödenir

Hello bidders,

Please only bid if you have your own server to test the code on thanks.

I have a php code which is working but sometimes it takes too long to execute.

Fatal error: Maximum execution time of 30 seconds exceeded in

I have tried adding ini_set('max_execution_time', 300); //300 seconds = 5 minutes but that results in using up the memory and the rest of my page doesn’t load.

Basicly with my code i can add any one word to it, 9 letter words seem to work but any word larger than 9 letters the code can’t execute fast enough due to there being too many combinations to search in the loop.

See examples here: [login to view URL]

"stop" works fine but "abbreviation" is too long

is there anyway to speed up the following code

<ol>

<?php

$checked = array();

function permute($str, $l, $r, $pspell_link)

{

global $checked;

if ($l == $r) {

if (empty($checked[$str])) {

$checked[$str] = true;

if (pspell_check($pspell_link, $str)) {

echo "<li><strong>" . ucwords($str) . "</strong></li>\n";

};

}

} else {

for ($i = $l; $i <= $r; $i++) {

$str = swap($str, $l, $i);

permute($str, $l + 1, $r, $pspell_link);

$str = swap($str, $l, $i);

}

}

}

function swap($a, $i, $j)

{

$temp;

$charArray = str_split($a);

$temp = $charArray[$i];

$charArray[$i] = $charArray[$j];

$charArray[$j] = $temp;

return implode($charArray);

}

$str = "$anagram";

$n = strlen($str);

$pspell_link = pspell_new("en");

permute($str, 0, $n - 1, $pspell_link);

?>

</ol>

PHP JavaScript MySQL Yazılım Mimarisi HTML

Proje NO: #21114819

Proje hakkında

36 teklif Uzak proje Aktif 4 yıl önce

Seçilen:

aipwork

Hello. Your algorithm does not improve cardinally and it depends directly on the length of a word. You use a full permutation search, which has a complexity of n! (See [login to view URL]) For exa Daha Fazla

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% GBP
(2 Değerlendirme)
1.8

Bu iş için 36 freelancer ortalamada £128 teklif veriyor

aftabyounas

Hi, I have read your project description and willing to do this for you in your required time spam with 100% Satisfaction. Kindly message me so we can discuss in detail over chat......

£50 GBP in 2 gün içinde
(460 Değerlendirme)
7.6
vw580939vw

Dear Sir, We can have the code access along with website (i.e. database, CSS, HTML ) etc, so we can review this closely? If you can set up things on separate development server, will do too. We offer GBP7/hr of workin Daha Fazla

£40 GBP in 7 gün içinde
(185 Değerlendirme)
7.5
JinDongZhe

Dear Manager. How do you do? i read your project carefully. I`m interested to work with you!! I have rich experience in web development and mobile . I think your project is adaptable for me. My goal will always be t Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% GBP
(108 Değerlendirme)
7.6
schoudhary1553

Hello, I have gone through your job posting and become very much interested to work with you. I am an expert in this field. I have already completed several projects like this. For evidence you can see my profile. Pl Daha Fazla

£220 GBP in 4 gün içinde
(164 Değerlendirme)
7.4
vranjan

Hi, My work experience as shown in my profile have helped me develop mastery in Website design & development. I'm a full-stack developer with more than 10 years of work experience. Expert in BOTH Backend and Front- Daha Fazla

£135 GBP in 7 gün içinde
(215 Değerlendirme)
7.5
brendanmullan90

Hello, my name is Brendan. I have read your project specifications and this job fits within my area of expertise. I would love to come on board and work on this with you. I am available to begin immediately. Relevant Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% GBP
(72 Değerlendirme)
6.7
jarki2017

Hello There is one way to resolve this issue. I am specializing in PHP for 14+ years. We can resolve this script with pararel method. Please ping me if you are interested in my proposal. Thanks

£500 GBP in 7 gün içinde
(46 Değerlendirme)
6.1
suryabeniwal

Dear Hiring Manager, I can help you in the project. Please let me know when we can discuss in more details so that we could proceed further. Looking forward for your response. Thanks. Kind Regards, Surya

£135 GBP in 7 gün içinde
(50 Değerlendirme)
6.9
whiteeagle0001

Hello, I have read your description in more detail and have much interest in your project. I have many experiences for Node-js, React-Redux, Laravel, HTML5, CSS3, Angular, Vue.js, Jquery, Ajax, and Bootstrap. So I thi Daha Fazla

£135 GBP in 7 gün içinde
(28 Değerlendirme)
5.8
greenforest0204

Hello i am very interested in your post project since i have rich experience on this kind of project. Actually, i am feeling confident about to give you perfect result in time. please call me Dmitrii. looking forward t Daha Fazla

£135 GBP in 7 gün içinde
(54 Değerlendirme)
6.0
TopDesigner315

Hello :) Thanks for your job posting. I saw your description carefully. I am a SEO web Developer who have 8+ years of experiences. My skills are Html5,CSS,SCSS, Bootstrap,Javascript,Jquery,MySql,PHP especially SEO is Daha Fazla

£90 GBP in 3 gün içinde
(41 Değerlendirme)
5.6
mderevyanchuk

Hi there! I briefly checked your script and noticed that script that checks spelling actually is set in recursion that seems to be not required and generates unnecessary workload. I can help you fix the script.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% GBP
(40 Değerlendirme)
5.7
rylkov

I have experience with slow PHP scripts. Usually I add JavaScript on client side and it run server PHP scripts by parts, shows the progress, calculated results, user can cancel script if he don't want to wait more. Thi Daha Fazla

£120 GBP in 7 gün içinde
(87 Değerlendirme)
5.8
sharktiger

Hello. I read your project fully and it is possible for me. As you can see my profile, I have rich experiences in angular and node and other skills. If you hire me, I will do my best and you will see successfully resul Daha Fazla

£135 GBP in 7 gün içinde
(28 Değerlendirme)
5.4
todool

dear employer, I am an experienced php programmer and I will give it a try on a no cure no pay basis. So if not succesfull you have to pay nothing, greetings, Tobie

£83 GBP in 7 gün içinde
(6 Değerlendirme)
4.2
projectsTF

Hello, Hope you are doing well!! Sure, I will speed up php Script as per your needs. I have 10 years of experience in web development and designing . I developed many websites please check my previous work over Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% GBP
(1 Yorum)
1.7
requiredtruth

i already see a ton of easy corrections. i also know where the biggest problems are and have methods to prove it.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% GBP
(0 Değerlendirme)
0.0
kannanvi

We are expert in PHP and SQL projects development and also have test server to test your project. if we follow the set of code standards, we can speed up the code.

£170 GBP in 5 gün içinde
(0 Değerlendirme)
0.0
gzvirid

Hi there, My name is George. I have advanced experience with Google cloud solutions, like BigQuery, DataFlow, Storage. Apache Spark, Apache Kafka, various NLP techniques, pandas, NLTK, numpy, developing and using ML m Daha Fazla

£135 GBP in 7 gün içinde
(0 Değerlendirme)
0.0