Hosting de Calidad
  • Inicio
  • Precios y servicios
  • F.a.q y ayudas
  • Realizar pedido
  • Webs alojadas
  • Quienes somos
  • Foro HyD
  • Contacto

    Zona Dominios

    Entrar
    registro de dominios


    Zona Hosting

    Entrar
    alojamiento web


    5 Métodos de Pago
    Tarjeta de crédito
    Domiciliación
    Transferencia
    Soporte Epagado
    Soporte Paypal

    Liberalización .es

    Ver mas
    dominios .es


  •  
     
     
    version_compare

    version_compare

    (PHP 4 >= 4_1_0)

    version_compare __  Compares two "PHP_standardized" version number strings

    Description

    int version_compare ( string version1, string version2 [, string operator])

    version_compare() compares two "PHP_standardized" version number strings_ This is useful if you would like to write programs working only on some versions of PHP_

    version_compare() returns _1 if the first version is lower than the second, 0 if they are equal, and +1 if the second is lower_

    The function first replaces _, _ and + with a dot _ in the version strings and also inserts dots _ before and after any non number so that for example '4_3_2RC1' becomes '4_3_2_RC_1'_ Then it splits the results like if you were using explode('_',$ver)_ Then it compares the parts starting from left to right_ If a part contains special version strings these are handled in the following order: dev < alpha = a < beta = b < RC < pl_ This way not only versions with different levels like '4_1' and '4_1_2' can be compared but also any PHP specific version containing development state_

    If you specify the third optional operator argument, you can test for a particular relationship_ The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively_ Using this argument, the function will return 1 if the relationship is the one specified by the operator, 0 otherwise_

    Ejemplo 1_ version_compare() example

    <?php
    // prints _1
    echo version_compare("4_0_4", "4_0_6");
    
    // these all print 1
    echo version_compare("4_0_4", "4_0_6", "<");
    echo version_compare("4_0_6", "4_0_6", "eq");
    ?>

     
       



    registro de dominios | alojamiento web | hosting por publicidad

       

     

    Manual de linux Manual de apache Manual de php Manual de mysql Manual de SQL Manual del Plesk Como funciona Paypal Manual de html