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.
This commit is contained in:
parent
3b63ef27fe
commit
a49cc60772
3 changed files with 48 additions and 16 deletions
|
|
@ -1,9 +1,14 @@
|
|||
extern char *s;
|
||||
#include <string>
|
||||
|
||||
extern std::string s;
|
||||
extern int x;
|
||||
|
||||
class Sync {
|
||||
public:
|
||||
int x;
|
||||
char *s;
|
||||
void printer(void);
|
||||
std::string s;
|
||||
void printer();
|
||||
void all_change();
|
||||
|
||||
Sync() : x(0) { }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue