Re: get_properties VS ce.default_properties
| From: | Pierre | Date: | Mon, 19 Feb 2007 16:36:35 +0000 |
| Subject: | Re: get_properties VS ce.default_properties | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4569@lists.php.net to get a copy of this message | ||
On 2/19/07, Piotr Pokora <piotrek.pokora@gmail.com> wrote:
Pierre <pierre.php@gmail.com> wrote: What do you do in the derived class constructor? (sample script). It may help to reproduce the segfault. Nothing. And I think it doesn't matter.What you do or not does matter in most cases. For example, you have to call the parent constructor.
Sample script can be :
class MySuperClass extends Swish {
var $prop;
function __construct() {}
}
$obj = new MySuperClass();
echo $obj->prop;
print_r($obj);
Constructor will work , latter two cases will trigger segfault due to underlying data
not being explicitly set to NULL or whatever.
Can you please start to use the sources (cvs or latest release)?
Using php 5.2.0:
class MySuperClass extends SwishHandle {
var $prop;
function __construct() {
parent::__construct("abc");
}
}
$obj = new MySuperClass();
echo $obj->prop;
var_dump($obj);
The parent constructor call only shows that it works (you will get an
exception here).
Please use the debug version, you will see the symbols. It is not hard to compile from sources either. It is a must if you develop PHP extensions. --Pierrebacktrace is useless here:debug mode? PHP debug? I use PHP5 from binary packages :(