PHP5's C extension API has changed substantially so you need to use -php7 to specify you want PHP7 compatible wrappers. Fixes https://github.com/swig/swig/issues/571
18 lines
481 B
PHP
18 lines
481 B
PHP
<?php
|
|
|
|
require "tests.php";
|
|
require "pointer_reference.php";
|
|
|
|
$s = pointer_reference::get();
|
|
check::equal($s->value, 10, "pointer_reference::get() failed");
|
|
|
|
$ss = new Struct(20);
|
|
pointer_reference::set($ss);
|
|
$i = Struct::instance();
|
|
check::equal($i->value, 20, "pointer_reference::set() failed");
|
|
|
|
check::equal(pointer_reference::overloading(1), 111, "overload test 1 failed");
|
|
check::equal(pointer_reference::overloading($ss), 222, "overload test 2 failed");
|
|
|
|
check::done();
|
|
?>
|