PHP function to compare two Roman numerals
It gives wrong results for 9 (IX) and 5 (V).

Some notes about the code:


In the following block the $evaluate = 8; and the break; statements are unnecessary, they never run because of the return statement.

{
    return true;
    $evaluate = 8;
    break;
}

Instead of commenting name the variable to what the comment says. 

//Create array with ordered list of roman numerals. 
$evaluation= array("M","D","C","L","X","V","I");


It could be $numerals or $numerals_in_order, for example.
7 and 8 are a magic numbers. They should be named constants or computed values. Do they come from the size of the array? If they do make it clear, it would improve readability.
while ($counter &lt; ((strlen($x_num)))&amp;&amp; $counter &lt; ((strlen($y_num))))


This could be simplified to the following:

$size = min(strlen($x_num), strlen($y_num));
while ($counter &lt; $size)

Instead of big if-elseif structures you could use continue and simple ifs since some of them returns the function if the condition is true, so the remaining code won't run. The last else also would be unnecessary.

$size_min = min(strlen($x_num), strlen($y_num));
while ($counter &lt; $size_min) {
    if ($x_num_arr[$counter] == $y_num_arr[$counter]) {
        $counter++;
        continue;
    }

    if(($x_num_arr[$counter]!=$evaluation[$evaluate])&amp;&amp;($y_num_arr[$counter]==$evaluation[$evaluate])) { 
        return true;
    }

    if(($x_num_arr[$counter]==$evaluation[$evaluate])&amp;&amp;( $y_num_arr[$counter]!=$evaluation[$evaluate])) {
        return false;
    }    

    $counter++;
}

Inside the for loop the $evaluation array is always indexed with $evaluate. You should create a local variable for this.
The same is true for $y_num_arr[$counter] and $x_num_arr[$counter] inside the while loop. (They could be $current_x and $current_y).
It might not be an issue (depending on the specification) but the function currently accepts invalid Roman numerals too (like IIX).
At the end of the function it returns with implicit NULL if both conditions are false in the following snippet:

if ($evaluate&lt;8&amp;&amp;(strlen($x_num) &lt; strlen($y_num)))
{return true;}

elseif ($evaluate&lt;8&amp;&amp;(strlen($x_num) &gt; strlen($y_num)))
{return false;}


You should make this explicit (add a return false as the last statement) or use an assert call if it should never happen.
You could easily write some test code to check that the comparison is fine for every possible Roman numeral.

for ($i = 1; $i &lt;= $max; $i++) {
    for ($j = 1; $j &lt;= $max; $j++) {
        $i_r = numberToRoman($i);
        $j_r = numberToRoman($j);
        $smaller = x_smaller_than_y($i_r, $j_r);
        if ($i &gt;= $j &amp;&amp; $smaller) {
            echo "error: $i, $j, $i_r, $j_r\n";
        }
    }
}


If I'm right $max should be 3888 and it finishes in a few minutes. You can find a numberToRoman function here, for example..