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.
14 lines
167 B
C++
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) { }
|
|
};
|