I am getting the following error:
$ php -d enable_dl=On test.php
PHP Fatal error: Using $this when not in object context in demo.php on line 90
swig generates:
static function create_concrete() { $r=base_create_concrete(); $this->_cPtr = $r; return $this; }
for the following input C++ code:
struct base
{
virtual void foo() = 0;
static base * create_concrete();
};
Full example is at:
https://github.com/malaterre/PublicRep/tree/master/SWIG/virtualbase
I'm not really clear how this differs from #1338 - you seem to have linked to the same example code from both...
It would make investigating easier if the code to reproduce was minimal, and included in the ticket, rather than on some external site as part of a larger codebase.
We no longer generate this PHP code (or indeed any PHP code) not use a special
_cPtr
property, so this will have been fixed by the change to use PHP's C API to wrap classes.