[PHP] Add support for PHP7.
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
This commit is contained in:
parent
bb98147965
commit
1169874f59
202 changed files with 11575 additions and 719 deletions
22
Examples/test-suite/php5/li_carrays_cpp_runme.php
Normal file
22
Examples/test-suite/php5/li_carrays_cpp_runme.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
require "tests.php";
|
||||
require "li_carrays_cpp.php";
|
||||
|
||||
// Check functions.
|
||||
check::functions(array(new_intarray,delete_intarray,intarray_getitem,intarray_setitem,doublearray_getitem,doublearray_setitem,doublearray_cast,doublearray_frompointer,xyarray_getitem,xyarray_setitem,xyarray_cast,xyarray_frompointer,delete_abarray,abarray_getitem,abarray_setitem));
|
||||
|
||||
// Check classes.
|
||||
// NB An "li_carrays_cpp" class is created as a mock namespace.
|
||||
check::classes(array(li_carrays_cpp,doubleArray,AB,XY,XYArray));
|
||||
|
||||
// Check global variables.
|
||||
check::globals(array(xy_x,xy_y,globalxyarray,ab_a,ab_b,globalabarray));
|
||||
|
||||
$d = new doubleArray(10);
|
||||
|
||||
$d->setitem(0, 7);
|
||||
$d->setitem(5, $d->getitem(0) + 3);
|
||||
check::equal($d->getitem(0) + $d->getitem(5), 17., "7+10==17");
|
||||
|
||||
check::done();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue