Encoding problem

2003-11-02
2003-11-19
  • Admin Korkman

    Admin Korkman - 2003-11-02

    Hi,

    just a note to all wondering why a script won't compile, here's a possible reason:

    <?

    class mmencode_test {
      var $what_wont_work;
      function dummy_func() {
        # This line works
        $this->what_wont_work = "Hello";
       
        # This line doesn't, the file can't be encoded
        $this->what_wont_work .= " world";
       
        # Using this line instead, doing exacly the same, the script can be encoded
        $this->what_wont_work = $this->what_wont_work." world";  # This line doesn't
       
      }
    }

    ?>

    A bit of information about *why* a script failed to compile would be helpful.

     
    • Admin Korkman

      Admin Korkman - 2003-11-02

      I forgot to mention I'm using the new PHP 5 Beta 2 and mmcache 2.4.5 on a slightly updated Debian Woody, i586. Haven't tried mmcache before and I like what I see, mostly. Just noticed another concatenation problem. The following code outputs nothing ($a[1] is empty) when cached:

      <?

      $a = array();

      $a[0] = "Hello";
      $a[1] = $a[0]." World";

      echo $a[1];

      ?>

      Dangerous. I think bugs of this size are at least PHP5 specific. Anyone else having this problem?

       
    • Dmitry Stogov

      Dmitry Stogov - 2003-11-19

      The BUG is fixed in 2.4.6.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks