[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
31
Examples/test-suite/php5/li_std_string_runme.php
Normal file
31
Examples/test-suite/php5/li_std_string_runme.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
require "tests.php";
|
||||
require "li_std_string.php";
|
||||
|
||||
// Global variables
|
||||
//$s="initial string";
|
||||
//check::equal(GlobalString2_get() ,"global string 2", "GlobalString2 test 1");
|
||||
|
||||
// Global variables
|
||||
$s = "initial string";
|
||||
check::equal(GlobalString2_get(), "global string 2", "GlobalString2 test 1");
|
||||
GlobalString2_set($s);
|
||||
check::equal(GlobalString2_get(), $s, "GlobalString2 test 2");
|
||||
check::equal(ConstGlobalString_get(), "const global string", "ConstGlobalString test");
|
||||
|
||||
// Member variables
|
||||
$myStructure = new Structure();
|
||||
check::equal($myStructure->MemberString2, "member string 2", "MemberString2 test 1");
|
||||
$myStructure->MemberString2 = $s;
|
||||
check::equal($myStructure->MemberString2, $s, "MemberString2 test 2");
|
||||
check::equal($myStructure->ConstMemberString, "const member string", "ConstMemberString test");
|
||||
|
||||
check::equal(Structure::StaticMemberString2(), "static member string 2", "StaticMemberString2 test 1");
|
||||
Structure::StaticMemberString2($s);
|
||||
check::equal(Structure::StaticMemberString2(), $s, "StaticMemberString2 test 2");
|
||||
// below broken ?
|
||||
//check::equal(Structure::ConstStaticMemberString(), "const static member string", "ConstStaticMemberString test");
|
||||
|
||||
check::done();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue