Fix PHP sync example

Mostly it was missing `%include <std_string.i>`
This commit is contained in:
Olly Betts 2021-04-19 11:26:32 +12:00
commit 09d06843d1
4 changed files with 19 additions and 19 deletions

View file

@ -11,23 +11,21 @@ echo "PHP reading object: string is '", $o->s, "' and value is ", $o->x, "\n";
$o->printer();
// FIXME something is up with the setter
// type error - s_set("global string");
x_set(42);
example::s_set("global string");
example::x_set(42);
// FIXME something is up with the setter
// type error - $o->s = "object string";
$o->s = "object string";
$o->x = 1234;
echo "PHP reading globals: string is '", s_get(), "' and value is ", x_get(), "\n";
echo "PHP reading object: string is '", $o->s, "' and value is ", $s->x, "\n";
echo "PHP reading globals: string is '", example::s_get(), "' and int is ", example::x_get(), "\n";
echo "PHP reading object: string is '", $o->s, "' and int is ", $o->x, "\n";
$o->printer();
echo "Calling all_change() method\n";
$o->all_change();
echo "PHP reading globals: string is '", s_get(), "' and value is ", x_get(), "\n";
echo "PHP reading object: string is '", $o->s, "' and value is ", $o->x, "\n";
echo "PHP reading globals: string is '", example::s_get(), "' and int is ", example::x_get(), "\n";
echo "PHP reading object: string is '", $o->s, "' and int is ", $o->x, "\n";
$o->printer();