PHP 5.0.0 Beta 1 released!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

w00t! I may be installing this on my home linux server this week. (If I can find time.)

While you're downloading PHP 5, don't forget to fill out the Zend survey. I did mine 2 days ago.

Mark Hensler
If there is no answer on Google, then there is no question.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I just read this article (here), which talked about the new OOP model for the Zend Engine 2 (part of PHP5).

Apparently, PHP4 didn't handle objects (or object members) by reference (always-pass by-val). I never knew that. Very sloppy.

The new model will handle objects (and object members) by reference now. It will also support private, public, protected, and static members/methods. As well as destructor methods. w00t!

Mark Hensler
If there is no answer on Google, then there is no question.

taff's picture

They have: 956 posts

Joined: Jun 2001

PHP 4.3.2 was just released about 2 months ago. Is PHP 5 in beta or something?

Edit: lol, never mind. I truly need to get some coffee into me before posting in the morning. Shocked

.....

They have: 218 posts

Joined: Apr 2001

"Apparently, PHP4 didn't handle objects (or object members) by reference (always-pass by-val). I never knew that. Very sloppy."

Yea, I noticed that. 'memory issues'. This illustrates that:

<?php
class FormClass {
   
    var
$num;
   
    function
setNum($num ){
   
$this->num = $num;
         }
   
    function
getNum(){
        return
$this->num;
    }
}

$f = new FormClass();
$f->setNum(1);

class
Ref {
    var
$num;
   
    function
setNum($num){
     
$this->fob = $GLOBALS[\"f\"];
     
$this->fob->setNum($num);
      }
   
    function getNum(){
        return
$this->fob->getNum();
    }
}

$r = new Ref();
$r->setNum(22);
echo \"<br><br>form object 1 num: \" .
$f->getNum() . \"<br>\";
echo \"form object 2 num: \" .
$r->getNum();
?>

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.