Union results of two functions in php class
Posted
by
Max
on Stack Overflow
See other posts from Stack Overflow
or by Max
Published on 2013-10-28T09:49:36Z
Indexed on
2013/10/28
9:53 UTC
Read the original article
Hit count: 174
I have php class(simple example):
<?php class test{
public function __construct() {
//some code
}
public function __destruct() {
//some code
}
public function echo1 {
//some code
return 1;
}
public function echo2 {
//some code
return 2;
}
}
How could I return results of this two functions echo1 and echo2 in class in one row don't creating two new objects for each function?
© Stack Overflow or respective owner