swig/Examples/php/sync/example.h
Olly Betts a49cc60772 Adjust PHP sync example
Make it work with how globals are actually wrapped.  It looks like
this example has never been right, but nobody noticed before PHP 8
started warning about the use of unset variables.

This reveals that handling of std::string properties needs fixing.
2021-04-18 10:00:34 +12:00

14 lines
167 B
C++

#include <string>
extern std::string s;
extern int x;
class Sync {
public:
int x;
std::string s;
void printer();
void all_change();
Sync() : x(0) { }
};