Jump to content

syntax error


shage

Recommended Posts

i get a syntax error

    function version_compare_replacement( $version1, $version2, $operator = "" )
    {
        if ( function_exists( "version_compare" ) )
        {
            return version_compare( $version1, $version2, $operator );
        }
        $version1 = strtr( $version1, "_-+", "..." );
        $version2 = strtr( $version2, "_-+", "..." );
        $version1 = eregi_replace( "([0-9]+)([A-Z]+)([0-9]+)", "\\1.\\2.\\3", $version1 );
        $version2 = eregi_replace( "([0-9]+)([A-Z]+)([0-9]+)", "\\1.\\2.\\3", $version2 );
        $parts1 = explode( ".", $version1 );
        $parts2 = explode( ".", $version1 );
        $parts_count = max( count( $parts1 ), count( $parts2 ) );
        $i = 0;
        for ( ; $i < $parts_count; ++$i )
        {
            $comparison = ( $version1, $version2, $operator );
            if ( $comparison != 0 )
            {
                return $comparison;
            }
        }
        return 0;
    }

 

at this line

$comparison = ( $version1, $version2, $operator );

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/79431-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.