Create a multiple if/elseif/else conditions
<?php
$this->start($loop);
for ($i = 0; $i < $this->loop; ++$i) {
if ($i === 'a') {
$value = 'a';
} elseif ($i === 'b') {
$value = 'b';
} elseif ($i === 3) {
$value = 3;
} else {
$value = $i;
}
}
return $this->end();
PHP | Loops | Seconds | Percent |
---|---|---|---|
8.3.13 | 100.000 | 0.009290 | +269% |
8.3.10 | 100.000 | 0.009344 | +270% |
8.3.9 | 100.000 | 0.008811 | +255% |
7.3.33 | 100.000 | 0.005928 | +171% |
7.3.31 | 100.000 | 0.005095 | +147% |
7.3.30 | 100.000 | 0.005267 | +152% |
7.3.29 | 100.000 | 0.004850 | +140% |
7.3.28 | 100.000 | 0.005894 | +170% |
7.3.27 | 100.000 | 0.006245 | +181% |
7.3.24 | 100.000 | 0.004384 | +127% |
7.3.23 | 100.000 | 0.004325 | +125% |
7.3.22 | 100.000 | 0.004939 | +143% |
7.3.19 | 100.000 | 0.004826 | +140% |
7.3.18 | 100.000 | 0.005909 | +171% |
7.3.17 | 100.000 | 0.005317 | +154% |
7.3.16 | 100.000 | 0.004456 | +129% |
7.3.15 | 100.000 | 0.004575 | +132% |
7.3.14 | 100.000 | 0.005566 | +161% |
7.3.13 | 100.000 | 0.006748 | +195% |
7.3.12 | 100.000 | 0.005359 | +155% |
7.3.11 | 100.000 | 0.004349 | +126% |
7.3.9 | 100.000 | 0.004238 | +123% |
7.3.8 | 100.000 | 0.003964 | +115% |
7.2.29 | 100.000 | 0.004917 | +142% |
8.3.13 | 10.000 | 0.001519 | +429% |
7.2.34 | 100.000 | 0.006119 | +177% |
7.2.33 | 100.000 | 0.005426 | +157% |
7.2.31 | 100.000 | 0.005151 | +149% |
7.2.30 | 100.000 | 0.005142 | +149% |
8.3.10 | 10.000 | 0.001147 | +324% |
7.2.28 | 100.000 | 0.005158 | +149% |
7.2.27 | 100.000 | 0.005572 | +161% |
7.2.26 | 100.000 | 0.006516 | +188% |
7.2.25 | 100.000 | 0.005972 | +173% |
7.2.24 | 100.000 | 0.003862 | +112% |
7.2.22 | 100.000 | 0.004215 | +122% |
7.2.21 | 100.000 | 0.003976 | +115% |
7.1.33 | 100.000 | 0.006641 | +192% |
7.1.32 | 100.000 | 0.005239 | +151% |
7.1.31 | 100.000 | 0.004683 | +135% |
7.1.0 | 100.000 | 0.029445 | +851% |
7.0.33 | 100.000 | 0.006129 | +177% |
7.0.7 | 100.000 | 0.028452 | +823% |
5.6.40 | 100.000 | 0.015556 | +450% |
5.6.22 | 100.000 | 0.061139 | +1768% |
5.5.36 | 100.000 | 0.063572 | +1838% |
5.4.45 | 100.000 | 0.062047 | +1794% |
5.3.29 | 100.000 | 0.070469 | +2037% |
8.3.9 | 10.000 | 0.001087 | +307% |
8.0.30 | 100.000 | 0.006804 | +197% |
8.0.29 | 100.000 | 0.003673 | +106% |
8.0.28 | 100.000 | 0.004197 | +121% |
8.0.27 | 100.000 | 0.005931 | +171% |
8.0.26 | 100.000 | 0.004731 | +137% |
8.0.25 | 100.000 | 0.005719 | +165% |
8.0.24 | 100.000 | 0.004842 | +140% |
8.0.23 | 100.000 | 0.005684 | +164% |
8.0.20 | 10.000 | 0.000433 | +122% |
8.0.20 | 100.000 | 0.004275 | +124% |
8.0.19 | 10.000 | 0.000627 | +177% |
8.0.19 | 100.000 | 0.005992 | +173% |
8.0.17 | 10.000 | 0.000625 | +176% |
8.0.17 | 100.000 | 0.005790 | +167% |
8.0.16 | 10.000 | 0.000513 | +145% |
8.0.16 | 100.000 | 0.005225 | +151% |
8.0.14 | 10.000 | 0.000583 | +164% |
8.0.14 | 100.000 | 0.005653 | +163% |
8.0.11 | 100.000 | 0.004841 | +140% |
8.0.10 | 100.000 | 0.005078 | +147% |
8.0.9 | 100.000 | 0.003875 | +112% |
8.0.8 | 100.000 | 0.005707 | +165% |
8.0.7 | 100.000 | 0.005397 | +156% |
8.0.3 | 100.000 | 0.006320 | +183% |
8.0.2 | 100.000 | 0.007617 | +220% |
8.0.0 | 100.000 | 0.004338 | +125% |
7.4.33 | 100.000 | 0.005202 | +150% |
7.4.32 | 100.000 | 0.004572 | +132% |
7.4.30 | 100.000 | 0.003848 | +111% |
7.4.28 | 100.000 | 0.004794 | +139% |
7.4.27 | 100.000 | 0.005124 | +148% |
7.4.24 | 100.000 | 0.004162 | +120% |
7.4.23 | 100.000 | 0.004163 | +120% |
7.4.22 | 100.000 | 0.003459 | 100% |
8.0.11 | 10.000 | 0.000526 | +148% |
8.0.10 | 10.000 | 0.000488 | +138% |
8.0.0 | 10.000 | 0.000545 | +154% |
7.4.29 | 100.000 | 0.005264 | +152% |
7.4.21 | 10.000 | 0.000490 | +138% |
7.4.21 | 100.000 | 0.004702 | +136% |
7.4.20 | 10.000 | 0.000478 | +135% |
7.4.20 | 100.000 | 0.005177 | +150% |
7.4.16 | 100.000 | 0.006003 | +174% |
7.4.15 | 100.000 | 0.007190 | +208% |
7.4.33 | 10.000 | 0.000586 | +165% |
7.4.32 | 10.000 | 0.000522 | +147% |
7.4.30 | 10.000 | 0.000419 | +118% |
7.4.29 | 10.000 | 0.000589 | +166% |
7.4.24 | 10.000 | 0.000474 | +134% |
7.4.23 | 10.000 | 0.000449 | +127% |
7.4.22 | 10.000 | 0.000374 | +106% |
7.4.13 | 100.000 | 0.004221 | +122% |
7.4.12 | 100.000 | 0.004023 | +116% |
7.4.11 | 100.000 | 0.004705 | +136% |
7.4.10 | 100.000 | 0.004507 | +130% |
8.0.2 | 10.000 | 0.000640 | +181% |
7.4.0 | 100.000 | 0.003892 | +113% |
8.0.30 | 10.000 | 0.000845 | +238% |
8.0.29 | 10.000 | 0.000354 | 100% |
8.0.28 | 10.000 | 0.000442 | +125% |
8.0.27 | 10.000 | 0.000525 | +148% |
8.0.26 | 10.000 | 0.000497 | +140% |
8.0.25 | 10.000 | 0.000639 | +180% |
8.0.24 | 10.000 | 0.000503 | +142% |
8.0.23 | 10.000 | 0.000532 | +150% |
8.0.9 | 10.000 | 0.000547 | +154% |
8.0.8 | 10.000 | 0.000643 | +181% |
8.0.7 | 10.000 | 0.000642 | +181% |
8.0.3 | 10.000 | 0.000686 | +194% |
7.4.28 | 10.000 | 0.000479 | +135% |
7.4.27 | 10.000 | 0.000505 | +142% |
7.4.16 | 10.000 | 0.000666 | +188% |
7.4.15 | 10.000 | 0.000741 | +209% |
7.4.13 | 10.000 | 0.000458 | +129% |
7.4.12 | 10.000 | 0.000535 | +151% |
7.4.11 | 10.000 | 0.000629 | +178% |
7.4.10 | 10.000 | 0.000494 | +139% |
7.4.7 | 10.000 | 0.000464 | +131% |
7.4.7 | 100.000 | 0.004428 | +128% |
7.4.6 | 10.000 | 0.000471 | +133% |
7.4.6 | 100.000 | 0.004459 | +129% |
7.4.5 | 10.000 | 0.000420 | +118% |
7.4.5 | 100.000 | 0.003771 | +109% |
7.4.4 | 10.000 | 0.000459 | +130% |
7.4.4 | 100.000 | 0.004554 | +132% |
7.4.3 | 10.000 | 0.000393 | +111% |
7.4.3 | 100.000 | 0.004605 | +133% |
7.4.1 | 100.000 | 0.006057 | +175% |
7.4.2 | 10.000 | 0.000587 | +166% |
7.4.2 | 100.000 | 0.005490 | +159% |
7.4.1 | 10.000 | 0.000592 | +167% |
7.4.0 | 10.000 | 0.000414 | +117% |
7.3.33 | 10.000 | 0.000680 | +192% |
7.3.31 | 10.000 | 0.000586 | +165% |
7.3.30 | 10.000 | 0.000534 | +151% |
7.3.29 | 10.000 | 0.000446 | +126% |
7.3.28 | 10.000 | 0.000521 | +147% |
7.3.27 | 10.000 | 0.000678 | +191% |
7.3.24 | 10.000 | 0.000457 | +129% |
7.3.23 | 10.000 | 0.000484 | +137% |
7.3.22 | 10.000 | 0.000574 | +162% |
7.3.19 | 10.000 | 0.000576 | +163% |
7.3.18 | 10.000 | 0.000542 | +153% |
7.3.17 | 10.000 | 0.000546 | +154% |
7.3.16 | 10.000 | 0.000467 | +132% |
7.3.15 | 10.000 | 0.000518 | +146% |
7.3.14 | 10.000 | 0.000622 | +176% |
7.3.13 | 10.000 | 0.000703 | +198% |
7.3.12 | 10.000 | 0.000617 | +174% |
7.3.11 | 10.000 | 0.000412 | +116% |
7.3.9 | 10.000 | 0.000435 | +123% |
7.3.8 | 10.000 | 0.000403 | +114% |
7.2.34 | 10.000 | 0.000667 | +188% |
7.2.33 | 10.000 | 0.000586 | +165% |
7.2.31 | 10.000 | 0.000563 | +159% |
7.2.30 | 10.000 | 0.000508 | +143% |
7.2.29 | 10.000 | 0.000510 | +144% |
7.2.28 | 10.000 | 0.000643 | +182% |
7.2.27 | 10.000 | 0.000650 | +184% |
7.2.26 | 10.000 | 0.000629 | +177% |
7.2.25 | 10.000 | 0.000712 | +201% |
7.2.24 | 10.000 | 0.000418 | +118% |
7.2.22 | 10.000 | 0.000493 | +139% |
7.2.21 | 10.000 | 0.000386 | +109% |
7.1.33 | 10.000 | 0.000705 | +199% |
7.1.32 | 10.000 | 0.000529 | +149% |
7.1.31 | 10.000 | 0.000455 | +128% |
7.1.0 | 10.000 | 0.003064 | +865% |
7.0.33 | 10.000 | 0.000677 | +191% |
7.0.7 | 10.000 | 0.002922 | +825% |
5.6.40 | 10.000 | 0.001810 | +511% |
5.6.22 | 10.000 | 0.006375 | +1799% |
5.5.36 | 10.000 | 0.006706 | +1892% |
5.4.45 | 10.000 | 0.006489 | +1831% |
5.3.29 | 10.000 | 0.007343 | +2072% |