Is this good approach to use debug functions for implementing features? Just thinking if using code like this

&lt;?php

abstract class helper
{
    private static $_cycles = array();

    public static function isOdd($v)
    {
        return (0 == ($v % 2)) ? false: true;
    }

    public static function isEven($v)
    {
        return !self::isOdd($v);
    }

    public static function cycle($odd, $even)
    {
        $trace = debug_backtrace();
        $trace = $trace[0];
        $cycle = crc32(serialize($trace));

        if (!isset(self::$_cycles[$cycle]))
        {
            self::$_cycles[$cycle] = 1;
        }

        return (self::isOdd(self::$_cycles[$cycle]++)) ? $odd : $even;
    }
}


for featues like this

&lt;?php foreach ($data as $record): ?&gt;
    &lt;p class="&lt;?php echo helper::cycle('oddCss', 'evenCss'); ?&gt;"&gt;&lt;?php echo $record; ?&gt;&lt;/p&gt;
&lt;?php endforeach; ?&gt;


is not overcoded

PS
Easy of usage (by html/css coders) is more important then performance in this particular case

UPDATE:
As @Geoffrey mentioned i didn't tell before that same 'oddCss', 'evenCss' pair may be used several times on one page (so basically within one request)
Since this is a code review site, let me point out that the following is an abomination:

return (0 == ($v % 2)) ? false: true;


The constants are redundant. Much simpler:

return (0 != ($v % 2));


(The parentheses are also redundant but that’s unrelated.)