Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----- first version -----
- namespace vendor\package;
- class someClass
- {
- private $c;
- public function __construct($a, $b)
- {
- $c = $a + $b;
- }
- /**
- * @return string
- */
- public function returnC()
- {
- return $this->c;
- }
- public function saySomething()
- {
- echo 'something';
- }
- }
- ----- second version -----
- namespace vendor\package;
- class someClass
- {
- private $a, $b;
- public function __construct($a, $b)
- {
- $this->a = $a;
- $this->b = $b;
- }
- public function saySomething($something = 'something')
- {
- echo $something;
- }
- /**
- * @return integer
- */
- public function returnC()
- {
- return $this->a + $this->b;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement