Multiple bench on PHP Source code and result Result width : - xdebug.profiler - profiler graph by KCachegrind - result in relative time only –
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
898 B

<?php
function if_A()
{
if (false) {}
elseif (false) {}
else {}
}
function if_B()
{
if (false) {}
elseif (false) {}
elseif (false) {}
elseif (false) {}
elseif (false) {}
else {}
}
function if_C()
{
if (false) {}
if (false) {}
if (false) {}
if (false) {}
if (false) {}
else {}
}
function switch_A()
{
switch (true) {
case false: break;
case false: break;
default: break;
}
}
function switch_B()
{
switch (true) {
case false: break;
case false: break;
case false: break;
case false: break;
case false: break;
default: break;
}
}
for ($i = 0; $i < 100000; $i++) {
if_A();
if_B();
if_C();
switch_A();
switch_B();
}