What do we call this?

Posted by shinkou on Stack Overflow See other posts from Stack Overflow or by shinkou
Published on 2010-05-27T08:03:50Z Indexed on 2010/05/27 8:11 UTC
Read the original article Hit count: 158

Filed under:
|

I'm wondering what do we call this kind of assignment.

<?php
class SimpleClass
{
    public $var1;
    public $var2;
    public $var3;

    public function SimpleClass()
    {
        $this->var1 = 'one';
        $this->var2 = 'two';
        $this->var3 = 'three';
    }
}

function test()
{
    $objSc = new SimpleClass();
    $objSc->var4 = 'WTF?!'; # <-- what do we call this?
    var_dump($objSc);
}

test();
?>

Better with references or links. Thanks in advance!

© Stack Overflow or respective owner

Related posts about php

Related posts about naming