Coder Social home page Coder Social logo

deprecated funktsioonid about blogipunkt HOT 2 OPEN

andris9 avatar andris9 commented on August 26, 2024
deprecated funktsioonid

from blogipunkt.

Comments (2)

andris9 avatar andris9 commented on August 26, 2024

See on juba tõsisem probleem, PHP 5.2 ja 5.3 versioonide vahe on tegelikult päris suur.

  1. Kui ma projektiga alustasin, siis kasutasin üsna julgelt BY REFERENCE parameetrite edastamist, hiljem tuli välja et 5.3 seda tunnistada enam aga ei taha. Tegu on üsna põhimõttelise probleemiga ja ühilduvuse tagamiseks tuleb päris palju ümber mõelda.

      // & märk muutuja ees tähendab, et 
      // edastatakse muutuja, mitte selle väärtus
      function foo(&$ref){
          $ref++; // muudab originaali, 5.3 ei toeta
      }
      function bar($val){
          $val++; // ei muuda originaali
      }
      $a = 1;
      foo($a); // lisab +1, BY REF
      bar($a); // ei tee midagi, BY VAL
      echo $a; // 2
    
  2. split on tööõnnetus, tegelikult peaks olema explode, kuna tegu ei ole regulaaravaldise, vaid tavalise stringiga, muudan lähiajal ära

  3. SimplePie kohta ei oska hetkel väga kosta, kuna pole seda 5.3 versiooniga proovinud.

Ma ise 5.3 eriti kasutanud pole. Kui aga tulevikku vaadata, siis vist muud üle ei jää, kui tuleb ikkagi sellega arvestada.

from blogipunkt.

andris9 avatar andris9 commented on August 26, 2024

Punkt 2 on parandatud muudatusega 4520dd7 - kõik split käsud on asendatud käsuga explode.

from blogipunkt.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.