-
-
Notifications
You must be signed in to change notification settings - Fork 466
Open
Description
Hi
I tried with the following code. Then I tried using the xdebug. I think it is slower than pure PHP functions.
Please help me.
namespace Utils;
class Greeting
{
public static function say()
{
int item;
for item in range(0, 100000) {
string i = "abc";
string k = str_replace("b", "--", i);
string z = "abc";
string m = str_replace("b", "--", z);
string t = "rrrr";
string g = str_replace("b", "--", t);
string q = "rrrr";
string u = str_replace("b", "--", q);
}
echo "okk";
}
}
PHP CODE
<?php
noo();
Utils\Greeting::say();
function noo(){
for ($ii=0; $ii++; $ii<= 100000) {
$i = "abc";
$k = str_replace("b", "--", $i);
$z = "abc";
$m = str_replace("b", "--", $z);
$t = "rrrr";
$g = str_replace("b", "--", $t);
$q = "rrrr";
$u = str_replace("b", "--", $q);
}
echo "okk";
}
Metadata
Metadata
Assignees
Labels
No labels