[ create a new paste ] login | about

Project: example
Link: http://example.codepad.org/RbDtVitK    [ raw code | output | fork ]

PHP, pasted on Jan 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

class welcome {

  public $count=1;

  function display() {
    return $this->count++;
  }

}

$obj = new welcome;
echo "First : ".$obj->display();
echo "\n";
echo "Second : ".$obj->display();


?>


Output:
1
2
First : 1
Second : 2


Create a new paste based on this one


Comments: