It looks like Yahoo! HD Trailers Page had a slight format change and therefore broke my parser. However, the parser has now been fixed. If you see anything weird, please notify us.
I’ve also made another fix where sometimes multiple Yahoo! trailers would point to the same url. That was due to the caching logic we had. I’ve went ahead and fixed the logic and now urls should always be up-to-date.
I also wrote an array recursive comparison function. There’s probably a bunch in the wild, but I couldn’t find one on php.net:
/// <summary>
/// Does a recursive array comparison
/// </summary>
/// <param name=”array1″>1st array</param>
/// <param name=”array2″>2nd array</param>
/// <returns>if the 2 arrays match</returns>
function array_equals_recursive( $array1, $array2 )
{
if( count( array_diff_assoc( $array1, $array2 )) != 0 ||
count( array_diff_assoc( $array2, $array1 ) ) != 0 )
{
return false;
}
foreach( array_keys( $array1 ) as $key )
{
if( is_array( $array1[ $key ] ) ||
is_array( $array2[ $key ] ) )
{
if( !is_array( $array1[ $key ] ) ||
!is_array( $array2[ $key ] ) ||
!array_equals_recursive(
$array1[ $key ],
$array2[ $key ] ) )
{
return false;
}
}
}
return true;
}
That’s Java code, right?
Actually, it’s PHP.
Oh, are the two similar?
I’m currently taking an AP Computer Science class at school, and it looks very similar to Java.
Yes, the coding syntax of PHP and Java are very similar. They both derive from the C syntax.
I see. Thanks for clarifying!
had to append an additional clause to the original if statement.