From d6d5db122bb9900b4d12ebeee038b233b92b46ed Mon Sep 17 00:00:00 2001
From: Olly Betts
Date: Thu, 7 Jun 2018 18:04:45 +1200
Subject: [PATCH] Remove support for PHP5
PHP5 is no longer actively supported by the PHP developers and security
support for it ends completely at the end of 2018, so it doesn't make
sense to include support for it in the upcoming SWIG 4.0.0 release.
See #701.
---
.travis.yml | 8 -
CHANGES.current | 6 +
Doc/Manual/Php.html | 39 +-
Doc/Manual/Preprocessor.html | 3 +-
Doc/Manual/SWIG.html | 3 +-
Examples/Makefile.in | 50 -
Examples/php5/callback/Makefile | 19 -
Examples/php5/callback/example.cxx | 4 -
Examples/php5/callback/example.h | 22 -
Examples/php5/callback/example.i | 11 -
Examples/php5/callback/index.html | 19 -
Examples/php5/callback/runme.php | 47 -
Examples/php5/check.list | 19 -
Examples/php5/class/Makefile | 20 -
Examples/php5/class/example.cxx | 28 -
Examples/php5/class/example.h | 34 -
Examples/php5/class/example.i | 9 -
Examples/php5/class/runme.php | 60 -
Examples/php5/constants/Makefile | 20 -
Examples/php5/constants/example.i | 26 -
Examples/php5/constants/runme.php | 28 -
Examples/php5/cpointer/Makefile | 20 -
Examples/php5/cpointer/example.c | 16 -
Examples/php5/cpointer/example.i | 31 -
Examples/php5/cpointer/runme.php | 47 -
Examples/php5/disown/Makefile | 20 -
Examples/php5/disown/example.cxx | 51 -
Examples/php5/disown/example.h | 50 -
Examples/php5/disown/example.i | 12 -
Examples/php5/disown/runme.php | 49 -
Examples/php5/enum/Makefile | 20 -
Examples/php5/enum/example.cxx | 37 -
Examples/php5/enum/example.h | 13 -
Examples/php5/enum/example.i | 12 -
Examples/php5/enum/runme.php | 32 -
Examples/php5/extend/Makefile | 19 -
Examples/php5/extend/example.cxx | 4 -
Examples/php5/extend/example.h | 56 -
Examples/php5/extend/example.i | 15 -
Examples/php5/extend/index.html | 19 -
Examples/php5/extend/runme.php | 76 -
Examples/php5/funcptr/Makefile | 20 -
Examples/php5/funcptr/example.c | 17 -
Examples/php5/funcptr/example.h | 7 -
Examples/php5/funcptr/example.i | 15 -
Examples/php5/funcptr/runme.php | 24 -
Examples/php5/overloading/Makefile | 20 -
Examples/php5/overloading/example.cxx | 55 -
Examples/php5/overloading/example.h | 46 -
Examples/php5/overloading/example.i | 8 -
Examples/php5/overloading/runme.php | 58 -
Examples/php5/pointer/Makefile | 20 -
Examples/php5/pointer/example.c | 16 -
Examples/php5/pointer/example.i | 30 -
Examples/php5/pointer/runme.php | 35 -
Examples/php5/pragmas/Makefile | 20 -
Examples/php5/pragmas/example.i | 32 -
Examples/php5/pragmas/include.php | 7 -
Examples/php5/pragmas/runme.php | 6 -
Examples/php5/proxy/Makefile | 20 -
Examples/php5/proxy/example.cxx | 43 -
Examples/php5/proxy/example.h | 43 -
Examples/php5/proxy/example.i | 12 -
Examples/php5/proxy/runme.php | 68 -
Examples/php5/reference/Makefile | 20 -
Examples/php5/reference/example.cxx | 49 -
Examples/php5/reference/example.h | 22 -
Examples/php5/reference/example.i | 43 -
Examples/php5/reference/runme.php | 49 -
Examples/php5/simple/Makefile | 20 -
Examples/php5/simple/example.c | 23 -
Examples/php5/simple/example.i | 8 -
Examples/php5/simple/runme.php | 25 -
Examples/php5/sync/Makefile | 20 -
Examples/php5/sync/example.cxx | 13 -
Examples/php5/sync/example.h | 9 -
Examples/php5/sync/example.i | 7 -
Examples/php5/sync/runme.php | 15 -
Examples/php5/value/Makefile | 20 -
Examples/php5/value/example.c | 13 -
Examples/php5/value/example.h | 8 -
Examples/php5/value/example.i | 17 -
Examples/php5/value/runme.php | 43 -
Examples/php5/variables/Makefile | 20 -
Examples/php5/variables/example.c | 95 -
Examples/php5/variables/example.h | 34 -
Examples/php5/variables/example.i | 44 -
Examples/php5/variables/runme.php | 96 -
Examples/test-suite/php5/Makefile.in | 81 -
.../php5/abstract_inherit_ok_runme.php | 12 -
.../php5/abstract_inherit_runme.php | 14 -
Examples/test-suite/php5/add_link_runme.php | 22 -
Examples/test-suite/php5/argout_runme.php | 38 -
Examples/test-suite/php5/arrayptr_runme.php | 14 -
.../test-suite/php5/arrays_global_runme.php | 19 -
.../php5/arrays_global_twodim_runme.php | 22 -
Examples/test-suite/php5/arrays_runme.php | 18 -
.../test-suite/php5/arrays_scope_runme.php | 16 -
Examples/test-suite/php5/callback_runme.php | 9 -
Examples/test-suite/php5/casts_runme.php | 18 -
.../test-suite/php5/char_strings_runme.php | 43 -
.../test-suite/php5/class_ignore_runme.php | 16 -
.../php5/conversion_namespace_runme.php | 13 -
.../php5/conversion_ns_template_runme.php | 10 -
Examples/test-suite/php5/conversion_runme.php | 13 -
...pp11_strongly_typed_enumerations_runme.php | 169 -
Examples/test-suite/php5/cpp_basic_runme.php | 20 -
Examples/test-suite/php5/cpp_static_runme.php | 14 -
.../php5/director_abstract_runme.php | 62 -
.../test-suite/php5/director_basic_runme.php | 58 -
.../php5/director_classic_runme.php | 150 -
.../php5/director_default_runme.php | 20 -
.../test-suite/php5/director_detect_runme.php | 55 -
.../test-suite/php5/director_enum_runme.php | 25 -
.../php5/director_exception_runme.php | 127 -
.../test-suite/php5/director_extend_runme.php | 24 -
.../php5/director_finalizer_runme.php | 61 -
.../test-suite/php5/director_frob_runme.php | 19 -
.../test-suite/php5/director_nested_runme.php | 74 -
.../php5/director_pass_by_value_runme.php | 24 -
.../php5/director_profile_runme.php | 53 -
.../php5/director_protected_runme.php | 70 -
.../test-suite/php5/director_stl_runme.php | 60 -
.../test-suite/php5/director_string_runme.php | 34 -
.../test-suite/php5/director_thread_runme.php | 32 -
.../test-suite/php5/director_unroll_runme.php | 29 -
.../php5/enum_scope_template_runme.php | 15 -
.../test-suite/php5/evil_diamond_ns_runme.php | 18 -
.../php5/evil_diamond_prop_runme.php | 38 -
.../test-suite/php5/evil_diamond_runme.php | 16 -
.../test-suite/php5/exception_order_runme.php | 39 -
.../php5/extend_template_ns_runme.php | 12 -
.../test-suite/php5/extend_template_runme.php | 12 -
Examples/test-suite/php5/grouping_runme.php | 22 -
.../php5/ignore_parameter_runme.php | 38 -
.../test-suite/php5/import_nomodule_runme.php | 20 -
.../test-suite/php5/li_carrays_cpp_runme.php | 22 -
Examples/test-suite/php5/li_carrays_runme.php | 22 -
Examples/test-suite/php5/li_factory_runme.php | 22 -
.../test-suite/php5/li_std_string_runme.php | 31 -
.../php5/li_std_vector_member_var_runme.php | 30 -
Examples/test-suite/php5/newobject1_runme.php | 19 -
Examples/test-suite/php5/newobject3_runme.php | 18 -
.../test-suite/php5/overload_rename_runme.php | 19 -
.../php5/overload_return_type_runme.php | 13 -
.../test-suite/php5/php_iterator_runme.php | 24 -
Examples/test-suite/php5/php_pragma_runme.php | 11 -
.../php5/pointer_reference_runme.php | 18 -
Examples/test-suite/php5/prefix_runme.php | 18 -
.../php5/preproc_constants_c_runme.php | 69 -
.../php5/preproc_constants_runme.php | 77 -
.../test-suite/php5/primitive_ref_runme.php | 34 -
.../test-suite/php5/rename_scope_runme.php | 16 -
Examples/test-suite/php5/skel.php | 15 -
.../php5/smart_pointer_rename_runme.php | 27 -
.../test-suite/php5/swig_exception_runme.php | 33 -
Examples/test-suite/php5/sym_runme.php | 22 -
.../php5/template_arg_typename_runme.php | 18 -
.../php5/template_construct_runme.php | 11 -
Examples/test-suite/php5/tests.php | 237 --
.../php5/threads_exception_runme.php | 43 -
.../php5/typedef_reference_runme.php | 13 -
.../php5/typemap_ns_using_runme.php | 9 -
Examples/test-suite/php5/using1_runme.php | 9 -
Examples/test-suite/php5/using2_runme.php | 9 -
.../php5/valuewrapper_base_runme.php | 13 -
.../php5/virtual_vs_nonvirtual_base_runme.php | 11 -
Examples/test-suite/php5/wrapmacro_runme.php | 12 -
Examples/test-suite/restrict_cplusplus.i | 3 +-
Lib/allkw.swg | 1 -
Lib/cdata.i | 7 -
Lib/exception.i | 7 -
Lib/php/phpkw.swg | 107 +-
Lib/php/phprun.swg | 2 +-
Lib/php5/const.i | 51 -
Lib/php5/director.swg | 170 -
Lib/php5/factory.i | 109 -
Lib/php5/globalvar.i | 361 --
Lib/php5/php.swg | 530 ---
Lib/php5/phpinit.swg | 25 -
Lib/php5/phpkw.swg | 866 -----
Lib/php5/phppointers.i | 42 -
Lib/php5/phprun.swg | 280 --
Lib/php5/std_common.i | 10 -
Lib/php5/std_deque.i | 1 -
Lib/php5/std_map.i | 76 -
Lib/php5/std_pair.i | 34 -
Lib/php5/std_string.i | 79 -
Lib/php5/std_vector.i | 102 -
Lib/php5/stl.i | 12 -
Lib/php5/typemaps.i | 322 --
Lib/php5/utils.i | 114 -
Makefile.in | 10 +-
Source/Makefile.am | 1 -
Source/Modules/main.cxx | 2 +-
Source/Modules/php.cxx | 27 +-
Source/Modules/php5.cxx | 2889 -----------------
Source/Modules/swigmain.cxx | 4 +-
Tools/testflags.py | 2 -
Tools/travis-linux-install.sh | 3 -
configure.ac | 61 -
201 files changed, 94 insertions(+), 11358 deletions(-)
delete mode 100644 Examples/php5/callback/Makefile
delete mode 100644 Examples/php5/callback/example.cxx
delete mode 100644 Examples/php5/callback/example.h
delete mode 100644 Examples/php5/callback/example.i
delete mode 100644 Examples/php5/callback/index.html
delete mode 100644 Examples/php5/callback/runme.php
delete mode 100644 Examples/php5/check.list
delete mode 100644 Examples/php5/class/Makefile
delete mode 100644 Examples/php5/class/example.cxx
delete mode 100644 Examples/php5/class/example.h
delete mode 100644 Examples/php5/class/example.i
delete mode 100644 Examples/php5/class/runme.php
delete mode 100644 Examples/php5/constants/Makefile
delete mode 100644 Examples/php5/constants/example.i
delete mode 100644 Examples/php5/constants/runme.php
delete mode 100644 Examples/php5/cpointer/Makefile
delete mode 100644 Examples/php5/cpointer/example.c
delete mode 100644 Examples/php5/cpointer/example.i
delete mode 100644 Examples/php5/cpointer/runme.php
delete mode 100644 Examples/php5/disown/Makefile
delete mode 100644 Examples/php5/disown/example.cxx
delete mode 100644 Examples/php5/disown/example.h
delete mode 100644 Examples/php5/disown/example.i
delete mode 100644 Examples/php5/disown/runme.php
delete mode 100644 Examples/php5/enum/Makefile
delete mode 100644 Examples/php5/enum/example.cxx
delete mode 100644 Examples/php5/enum/example.h
delete mode 100644 Examples/php5/enum/example.i
delete mode 100644 Examples/php5/enum/runme.php
delete mode 100644 Examples/php5/extend/Makefile
delete mode 100644 Examples/php5/extend/example.cxx
delete mode 100644 Examples/php5/extend/example.h
delete mode 100644 Examples/php5/extend/example.i
delete mode 100644 Examples/php5/extend/index.html
delete mode 100644 Examples/php5/extend/runme.php
delete mode 100644 Examples/php5/funcptr/Makefile
delete mode 100644 Examples/php5/funcptr/example.c
delete mode 100644 Examples/php5/funcptr/example.h
delete mode 100644 Examples/php5/funcptr/example.i
delete mode 100644 Examples/php5/funcptr/runme.php
delete mode 100644 Examples/php5/overloading/Makefile
delete mode 100644 Examples/php5/overloading/example.cxx
delete mode 100644 Examples/php5/overloading/example.h
delete mode 100644 Examples/php5/overloading/example.i
delete mode 100644 Examples/php5/overloading/runme.php
delete mode 100644 Examples/php5/pointer/Makefile
delete mode 100644 Examples/php5/pointer/example.c
delete mode 100644 Examples/php5/pointer/example.i
delete mode 100644 Examples/php5/pointer/runme.php
delete mode 100644 Examples/php5/pragmas/Makefile
delete mode 100644 Examples/php5/pragmas/example.i
delete mode 100644 Examples/php5/pragmas/include.php
delete mode 100644 Examples/php5/pragmas/runme.php
delete mode 100644 Examples/php5/proxy/Makefile
delete mode 100644 Examples/php5/proxy/example.cxx
delete mode 100644 Examples/php5/proxy/example.h
delete mode 100644 Examples/php5/proxy/example.i
delete mode 100644 Examples/php5/proxy/runme.php
delete mode 100644 Examples/php5/reference/Makefile
delete mode 100644 Examples/php5/reference/example.cxx
delete mode 100644 Examples/php5/reference/example.h
delete mode 100644 Examples/php5/reference/example.i
delete mode 100644 Examples/php5/reference/runme.php
delete mode 100644 Examples/php5/simple/Makefile
delete mode 100644 Examples/php5/simple/example.c
delete mode 100644 Examples/php5/simple/example.i
delete mode 100644 Examples/php5/simple/runme.php
delete mode 100644 Examples/php5/sync/Makefile
delete mode 100644 Examples/php5/sync/example.cxx
delete mode 100644 Examples/php5/sync/example.h
delete mode 100644 Examples/php5/sync/example.i
delete mode 100644 Examples/php5/sync/runme.php
delete mode 100644 Examples/php5/value/Makefile
delete mode 100644 Examples/php5/value/example.c
delete mode 100644 Examples/php5/value/example.h
delete mode 100644 Examples/php5/value/example.i
delete mode 100644 Examples/php5/value/runme.php
delete mode 100644 Examples/php5/variables/Makefile
delete mode 100644 Examples/php5/variables/example.c
delete mode 100644 Examples/php5/variables/example.h
delete mode 100644 Examples/php5/variables/example.i
delete mode 100644 Examples/php5/variables/runme.php
delete mode 100644 Examples/test-suite/php5/Makefile.in
delete mode 100644 Examples/test-suite/php5/abstract_inherit_ok_runme.php
delete mode 100644 Examples/test-suite/php5/abstract_inherit_runme.php
delete mode 100644 Examples/test-suite/php5/add_link_runme.php
delete mode 100644 Examples/test-suite/php5/argout_runme.php
delete mode 100644 Examples/test-suite/php5/arrayptr_runme.php
delete mode 100644 Examples/test-suite/php5/arrays_global_runme.php
delete mode 100644 Examples/test-suite/php5/arrays_global_twodim_runme.php
delete mode 100644 Examples/test-suite/php5/arrays_runme.php
delete mode 100644 Examples/test-suite/php5/arrays_scope_runme.php
delete mode 100644 Examples/test-suite/php5/callback_runme.php
delete mode 100644 Examples/test-suite/php5/casts_runme.php
delete mode 100644 Examples/test-suite/php5/char_strings_runme.php
delete mode 100644 Examples/test-suite/php5/class_ignore_runme.php
delete mode 100644 Examples/test-suite/php5/conversion_namespace_runme.php
delete mode 100644 Examples/test-suite/php5/conversion_ns_template_runme.php
delete mode 100644 Examples/test-suite/php5/conversion_runme.php
delete mode 100644 Examples/test-suite/php5/cpp11_strongly_typed_enumerations_runme.php
delete mode 100644 Examples/test-suite/php5/cpp_basic_runme.php
delete mode 100644 Examples/test-suite/php5/cpp_static_runme.php
delete mode 100644 Examples/test-suite/php5/director_abstract_runme.php
delete mode 100644 Examples/test-suite/php5/director_basic_runme.php
delete mode 100644 Examples/test-suite/php5/director_classic_runme.php
delete mode 100644 Examples/test-suite/php5/director_default_runme.php
delete mode 100644 Examples/test-suite/php5/director_detect_runme.php
delete mode 100644 Examples/test-suite/php5/director_enum_runme.php
delete mode 100644 Examples/test-suite/php5/director_exception_runme.php
delete mode 100644 Examples/test-suite/php5/director_extend_runme.php
delete mode 100644 Examples/test-suite/php5/director_finalizer_runme.php
delete mode 100644 Examples/test-suite/php5/director_frob_runme.php
delete mode 100644 Examples/test-suite/php5/director_nested_runme.php
delete mode 100644 Examples/test-suite/php5/director_pass_by_value_runme.php
delete mode 100644 Examples/test-suite/php5/director_profile_runme.php
delete mode 100644 Examples/test-suite/php5/director_protected_runme.php
delete mode 100644 Examples/test-suite/php5/director_stl_runme.php
delete mode 100644 Examples/test-suite/php5/director_string_runme.php
delete mode 100644 Examples/test-suite/php5/director_thread_runme.php
delete mode 100644 Examples/test-suite/php5/director_unroll_runme.php
delete mode 100644 Examples/test-suite/php5/enum_scope_template_runme.php
delete mode 100644 Examples/test-suite/php5/evil_diamond_ns_runme.php
delete mode 100644 Examples/test-suite/php5/evil_diamond_prop_runme.php
delete mode 100644 Examples/test-suite/php5/evil_diamond_runme.php
delete mode 100644 Examples/test-suite/php5/exception_order_runme.php
delete mode 100644 Examples/test-suite/php5/extend_template_ns_runme.php
delete mode 100644 Examples/test-suite/php5/extend_template_runme.php
delete mode 100644 Examples/test-suite/php5/grouping_runme.php
delete mode 100644 Examples/test-suite/php5/ignore_parameter_runme.php
delete mode 100644 Examples/test-suite/php5/import_nomodule_runme.php
delete mode 100644 Examples/test-suite/php5/li_carrays_cpp_runme.php
delete mode 100644 Examples/test-suite/php5/li_carrays_runme.php
delete mode 100644 Examples/test-suite/php5/li_factory_runme.php
delete mode 100644 Examples/test-suite/php5/li_std_string_runme.php
delete mode 100644 Examples/test-suite/php5/li_std_vector_member_var_runme.php
delete mode 100644 Examples/test-suite/php5/newobject1_runme.php
delete mode 100644 Examples/test-suite/php5/newobject3_runme.php
delete mode 100644 Examples/test-suite/php5/overload_rename_runme.php
delete mode 100644 Examples/test-suite/php5/overload_return_type_runme.php
delete mode 100644 Examples/test-suite/php5/php_iterator_runme.php
delete mode 100644 Examples/test-suite/php5/php_pragma_runme.php
delete mode 100644 Examples/test-suite/php5/pointer_reference_runme.php
delete mode 100644 Examples/test-suite/php5/prefix_runme.php
delete mode 100644 Examples/test-suite/php5/preproc_constants_c_runme.php
delete mode 100644 Examples/test-suite/php5/preproc_constants_runme.php
delete mode 100644 Examples/test-suite/php5/primitive_ref_runme.php
delete mode 100644 Examples/test-suite/php5/rename_scope_runme.php
delete mode 100644 Examples/test-suite/php5/skel.php
delete mode 100644 Examples/test-suite/php5/smart_pointer_rename_runme.php
delete mode 100644 Examples/test-suite/php5/swig_exception_runme.php
delete mode 100644 Examples/test-suite/php5/sym_runme.php
delete mode 100644 Examples/test-suite/php5/template_arg_typename_runme.php
delete mode 100644 Examples/test-suite/php5/template_construct_runme.php
delete mode 100644 Examples/test-suite/php5/tests.php
delete mode 100644 Examples/test-suite/php5/threads_exception_runme.php
delete mode 100644 Examples/test-suite/php5/typedef_reference_runme.php
delete mode 100644 Examples/test-suite/php5/typemap_ns_using_runme.php
delete mode 100644 Examples/test-suite/php5/using1_runme.php
delete mode 100644 Examples/test-suite/php5/using2_runme.php
delete mode 100644 Examples/test-suite/php5/valuewrapper_base_runme.php
delete mode 100644 Examples/test-suite/php5/virtual_vs_nonvirtual_base_runme.php
delete mode 100644 Examples/test-suite/php5/wrapmacro_runme.php
delete mode 100644 Lib/php5/const.i
delete mode 100644 Lib/php5/director.swg
delete mode 100644 Lib/php5/factory.i
delete mode 100644 Lib/php5/globalvar.i
delete mode 100644 Lib/php5/php.swg
delete mode 100644 Lib/php5/phpinit.swg
delete mode 100644 Lib/php5/phpkw.swg
delete mode 100644 Lib/php5/phppointers.i
delete mode 100644 Lib/php5/phprun.swg
delete mode 100644 Lib/php5/std_common.i
delete mode 100644 Lib/php5/std_deque.i
delete mode 100644 Lib/php5/std_map.i
delete mode 100644 Lib/php5/std_pair.i
delete mode 100644 Lib/php5/std_string.i
delete mode 100644 Lib/php5/std_vector.i
delete mode 100644 Lib/php5/stl.i
delete mode 100644 Lib/php5/typemaps.i
delete mode 100644 Lib/php5/utils.i
delete mode 100644 Source/Modules/php5.cxx
diff --git a/.travis.yml b/.travis.yml
index 59c06c637..7e7af91a2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -104,11 +104,6 @@ matrix:
env: SWIGLANG=perl5
sudo: required
dist: trusty
- - compiler: gcc
- os: linux
- env: SWIGLANG=php5
- sudo: required
- dist: trusty
- compiler: gcc
os: linux
env: SWIGLANG=php VER=7.0
@@ -308,9 +303,6 @@ matrix:
- compiler: clang
os: osx
env: SWIGLANG=perl5
- - compiler: clang
- os: osx
- env: SWIGLANG=php5
- compiler: clang
os: osx
env: SWIGLANG=python
diff --git a/CHANGES.current b/CHANGES.current
index 174c60ef6..3a0e5c079 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -7,6 +7,12 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.0.0 (in progress)
===========================
+2018-06-07: olly
+ [PHP5] Support for PHP5 has been removed. PHP5 is no longer
+ actively supported by the PHP developers and security support for
+ it ends completely at the end of 2018, so it doesn't make sense
+ to include support for it in the upcoming SWIG 4.0.0 release.
+
2018-06-06: olly
[Lua] Improve configure probes for Lua headers and libs used in testsuite.
diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html
index 8d2c3e8e4..d72bc058e 100644
--- a/Doc/Manual/Php.html
+++ b/Doc/Manual/Php.html
@@ -50,20 +50,13 @@
-In this chapter, we discuss SWIG's support of PHP. The PHP module
-was extensively rewritten in release 1.3.26, and support for generating
-OO wrappers for PHP5 was added in 1.3.30. The PHP module now supports most
-of the features available in some of the other languages.
+In this chapter, we discuss SWIG's support of PHP. SWIG currently supports
+generating wrappers for PHP7. Support for PHP5 was removed in SWIG 4.0.0
+and support for PHP4 was removed in SWIG 1.3.37.
-SWIG supports generating wrappers for PHP5 and PHP7. Support for PHP4 was removed
-in SWIG 1.3.37.
-
-
-
-Currently any PHP5 or PHP7 release should work, but we don't regularly test with
-PHP < 5.3.
+Currently any PHP7 release should work.
@@ -81,9 +74,9 @@ available.
-To build a PHP extension, run swig using the -php5 or
--php7 option as follows (-php is also supported
-and currently is an alias for -php5):
+To build a PHP extension, run swig using the -php7 option as follows
+(-php is also supported and currently is an alias for -php7
+but prior to SWIG 4.0.0 it was an alias for -php5):
@@ -107,9 +100,7 @@ also contain PHP class wrappers.
SWIG can generate PHP extensions from C++ libraries as well when
given the -c++ option. The support for C++ is discussed in
more detail in section 27.2.6. The generated
-C++ wrapper will be called example_wrap.cpp (for PHP5) or
-example_wrap.cxx (for PHP7 where the default has been changed to align
-with SWIG's default for every other language). You can specify a
+C++ wrapper will be called example_wrap.cxx. You can specify a
different extension for the C++ wrapper using -cppext -
e.g. if you want example_wrap.cc use -cppext cc.
@@ -172,8 +163,8 @@ PHP script which uses your extension:
-But note that this doesn't work when running PHP through a webserver in PHP5.3
-and later - you'll need to use extension in php.ini as
+But note that dl() isn't supported when running PHP through a
+webserver - you'll need to use extension in php.ini as
described above.
@@ -199,7 +190,8 @@ It is important to understand that PHP uses a single global namespace
into which all symbols from extension modules are loaded. It is quite
possible for names of symbols in one extension module to clash with
other symbols unless care is taken to %rename them. At present
-SWIG doesn't have support for the namespace feature added in PHP 5.3.
+SWIG doesn't have support for generating wrappers which make use of PHP's
+namespace feature.
@@ -525,13 +517,6 @@ this, one needs to include phppointers.i which defines the
named typemap REF.
-
-Prior to SWIG 3.0, the REF typemaps relied on PHP's call-time
-pass-by-reference, which was deprecated in PHP 5.3 and removed in PHP 5.4.
-So if you use these REF typemaps, you should ensure that SWIG≥3.0 is
-used to generate wrappers from your interface file.
-
-
In case you write your own typemaps, SWIG supports an attribute called
byref: if you set that, then SWIG will make sure that the generated
diff --git a/Doc/Manual/Preprocessor.html b/Doc/Manual/Preprocessor.html
index 8e638f3ba..83a17f2c4 100644
--- a/Doc/Manual/Preprocessor.html
+++ b/Doc/Manual/Preprocessor.html
@@ -125,8 +125,7 @@ SWIGMZSCHEME Defined when using Mzscheme
SWIGOCAML Defined when using Ocaml
SWIGOCTAVE Defined when using Octave
SWIGPERL Defined when using Perl
-SWIGPHP Defined when using PHP5 or PHP7
-SWIGPHP5 Defined when using PHP5
+SWIGPHP Defined when using PHP (any version)
SWIGPHP7 Defined when using PHP7
SWIGPIKE Defined when using Pike
SWIGPYTHON Defined when using Python
diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html
index ffc373f24..70fc694e3 100644
--- a/Doc/Manual/SWIG.html
+++ b/Doc/Manual/SWIG.html
@@ -131,7 +131,6 @@ can be obtained by typing swig -help or swig
-ocaml Generate Ocaml wrappers
-octave Generate Octave wrappers
-perl Generate Perl wrappers
--php5 Generate PHP5 wrappers
-php7 Generate PHP7 wrappers
-pike Generate Pike wrappers
-python Generate Python wrappers
@@ -145,7 +144,7 @@ can be obtained by typing swig -help or swig
-c++ Enable C++ processing
-cppext ext Change file extension of C++ generated files to ext
- (default is cxx, except for PHP5 which uses cpp)
+ (default is cxx)
-Dsymbol Define a preprocessor symbol
-Fmicrosoft Display error/warning messages in Microsoft format
-Fstandard Display error/warning messages in commonly used format
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index d22450ec9..3f07aed29 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -1071,56 +1071,6 @@ ruby_clean:
rm -f core @EXTRA_CLEAN@
rm -f *.@OBJEXT@ *$(RUBY_SO)
-##################################################################
-##### PHP5 ######
-##################################################################
-
-PHP5 = @PHP5@
-PHP5_INCLUDE = @PHP5INC@
-PHP5_SO = @PHP5_SO@
-PHP5_SCRIPT = $(SRCDIR)$(RUNME).php
-
-# -------------------------------------------------------------------
-# Build a PHP5 dynamically loadable module (C)
-# -------------------------------------------------------------------
-
-php5: $(SRCDIR_SRCS)
- $(SWIG) -php5 $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PHP5_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP5_SO)
-
-# --------------------------------------------------------------------
-# Build a PHP5 dynamically loadable module (C++)
-# --------------------------------------------------------------------
-
-php5_cpp: $(SRCDIR_SRCS)
- $(SWIG) -php5 -cppext cxx -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP5_INCLUDE)
- $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP5_SO)
-
-# -----------------------------------------------------------------
-# Running a PHP5 example
-# -----------------------------------------------------------------
-
-php5_run:
- $(RUNTOOL) $(PHP5) -n -q -d extension_dir=. -d safe_mode=Off $(PHP5_SCRIPT) $(RUNPIPE)
-
-# -----------------------------------------------------------------
-# Version display
-# -----------------------------------------------------------------
-
-php5_version:
- $(PHP5) -v | head -n 1
-
-# -----------------------------------------------------------------
-# Cleaning the PHP5 examples
-# -----------------------------------------------------------------
-
-php5_clean:
- rm -f *_wrap* *~ .~* example.php php_example.h
- rm -f core @EXTRA_CLEAN@
- rm -f *.@OBJEXT@ *$(PHP5_SO)
-
##################################################################
##### PHP7 ######
##################################################################
diff --git a/Examples/php5/callback/Makefile b/Examples/php5/callback/Makefile
deleted file mode 100644
index 3a34106c3..000000000
--- a/Examples/php5/callback/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS = -lm
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/callback/example.cxx b/Examples/php5/callback/example.cxx
deleted file mode 100644
index 450d75608..000000000
--- a/Examples/php5/callback/example.cxx
+++ /dev/null
@@ -1,4 +0,0 @@
-/* File : example.cxx */
-
-#include "example.h"
-
diff --git a/Examples/php5/callback/example.h b/Examples/php5/callback/example.h
deleted file mode 100644
index 2a0194999..000000000
--- a/Examples/php5/callback/example.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* File : example.h */
-
-#include
-
-class Callback {
-public:
- virtual ~Callback() { std::cout << "Callback::~Callback()" << std:: endl; }
- virtual void run() { std::cout << "Callback::run()" << std::endl; }
-};
-
-
-class Caller {
-private:
- Callback *_callback;
-public:
- Caller(): _callback(0) {}
- ~Caller() { delCallback(); }
- void delCallback() { delete _callback; _callback = 0; }
- void setCallback(Callback *cb) { delCallback(); _callback = cb; }
- void call() { if (_callback) _callback->run(); }
-};
-
diff --git a/Examples/php5/callback/example.i b/Examples/php5/callback/example.i
deleted file mode 100644
index cf61ef9d2..000000000
--- a/Examples/php5/callback/example.i
+++ /dev/null
@@ -1,11 +0,0 @@
-/* File : example.i */
-%module(directors="1") example
-%{
-#include "example.h"
-%}
-
-/* turn on director wrapping Callback */
-%feature("director") Callback;
-
-%include "example.h"
-
diff --git a/Examples/php5/callback/index.html b/Examples/php5/callback/index.html
deleted file mode 100644
index 2a6cbdff9..000000000
--- a/Examples/php5/callback/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-SWIG:Examples:php5:callback
-
-
-
-
-
-SWIG/Examples/php5/callback/
-
-
-Implementing C++ callbacks in PHP5
-
-
-This example illustrates how to use directors to implement C++ callbacks in PHP5.
-
-
-
-
diff --git a/Examples/php5/callback/runme.php b/Examples/php5/callback/runme.php
deleted file mode 100644
index 2be71994f..000000000
--- a/Examples/php5/callback/runme.php
+++ /dev/null
@@ -1,47 +0,0 @@
-thisown = 0;
-$caller->setCallback($callback);
-$caller->call();
-$caller->delCallback();
-
-print "\n";
-print "Adding and calling a PHP callback\n";
-print "------------------------------------\n";
-
-# Add a PHP callback.
-
-$callback = new PhpCallback();
-$callback->thisown = 0;
-$caller->setCallback($callback);
-$caller->call();
-$caller->delCallback();
-
-# All done.
-
-print "php exit\n";
-
-?>
diff --git a/Examples/php5/check.list b/Examples/php5/check.list
deleted file mode 100644
index fef3feba6..000000000
--- a/Examples/php5/check.list
+++ /dev/null
@@ -1,19 +0,0 @@
-# see top-level Makefile.in
-# (see also top-level configure.ac kludge)
-callback
-class
-constants
-cpointer
-disown
-enum
-extend
-funcptr
-overloading
-pointer
-pragmas
-proxy
-reference
-simple
-sync
-value
-variables
diff --git a/Examples/php5/class/Makefile b/Examples/php5/class/Makefile
deleted file mode 100644
index 8346a1dae..000000000
--- a/Examples/php5/class/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/class/example.cxx b/Examples/php5/class/example.cxx
deleted file mode 100644
index 046304519..000000000
--- a/Examples/php5/class/example.cxx
+++ /dev/null
@@ -1,28 +0,0 @@
-/* File : example.cxx */
-
-#include "example.h"
-#define M_PI 3.14159265358979323846
-
-/* Move the shape to a new location */
-void Shape::move(double dx, double dy) {
- x += dx;
- y += dy;
-}
-
-int Shape::nshapes = 0;
-
-double Circle::area() {
- return M_PI*radius*radius;
-}
-
-double Circle::perimeter() {
- return 2*M_PI*radius;
-}
-
-double Square::area() {
- return width*width;
-}
-
-double Square::perimeter() {
- return 4*width;
-}
diff --git a/Examples/php5/class/example.h b/Examples/php5/class/example.h
deleted file mode 100644
index 0dff185b2..000000000
--- a/Examples/php5/class/example.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* File : example.h */
-
-class Shape {
-public:
- Shape() {
- nshapes++;
- }
- virtual ~Shape() {
- nshapes--;
- }
- double x, y;
- void move(double dx, double dy);
- virtual double area() = 0;
- virtual double perimeter() = 0;
- static int nshapes;
-};
-
-class Circle : public Shape {
-private:
- double radius;
-public:
- Circle(double r) : radius(r) { }
- virtual double area();
- virtual double perimeter();
-};
-
-class Square : public Shape {
-private:
- double width;
-public:
- Square(double w) : width(w) { }
- virtual double area();
- virtual double perimeter();
-};
diff --git a/Examples/php5/class/example.i b/Examples/php5/class/example.i
deleted file mode 100644
index fbdf7249f..000000000
--- a/Examples/php5/class/example.i
+++ /dev/null
@@ -1,9 +0,0 @@
-/* File : example.i */
-%module example
-
-%{
-#include "example.h"
-%}
-
-/* Let's just grab the original header file here */
-%include "example.h"
diff --git a/Examples/php5/class/runme.php b/Examples/php5/class/runme.php
deleted file mode 100644
index 99c253b46..000000000
--- a/Examples/php5/class/runme.php
+++ /dev/null
@@ -1,60 +0,0 @@
-x = 20;
-$c->y = 30;
-$s->x = -10;
-$s->y = 5;
-
-print "\nHere is their current position:\n";
-print " Circle = ({$c->x},{$c->y})\n";
-print " Square = ({$s->x},{$s->y})\n";
-
-# ----- Call some methods -----
-
-# Notice how the Shape_area() and Shape_perimeter() functions really
-# invoke the appropriate virtual method on each object.
-print "\nHere are some properties of the shapes:\n";
-foreach (array($c,$s) as $o) {
- print " ". get_class($o) . "\n";
- print " area = {$o->area()}\n";
- print " perimeter = {$o->perimeter()}\n";
-}
-
-# ----- Delete everything -----
-
-print "\nGuess I'll clean up now\n";
-
-# Note: this invokes the virtual destructor
-$c = NULL;
-$s = NULL;
-
-# and don't forget the $o from the for loop above. It still refers to
-# the square.
-$o = NULL;
-
-print Shape::nshapes() . " shapes remain\n";
-print "Goodbye\n";
-
-?>
diff --git a/Examples/php5/constants/Makefile b/Examples/php5/constants/Makefile
deleted file mode 100644
index f9557fa89..000000000
--- a/Examples/php5/constants/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS =
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/constants/example.i b/Examples/php5/constants/example.i
deleted file mode 100644
index 0098a893a..000000000
--- a/Examples/php5/constants/example.i
+++ /dev/null
@@ -1,26 +0,0 @@
-/* File : example.i */
-%module example
-
-/* A few preprocessor macros */
-
-#define ICONST 42
-#define FCONST 2.1828
-#define CCONST 'x'
-#define CCONST2 '\n'
-#define SCONST "Hello World"
-#define SCONST2 "\"Hello World\""
-
-/* This should work just fine */
-#define EXPR ICONST + 3*(FCONST)
-
-/* This shouldn't do anything */
-#define EXTERN extern
-
-/* Neither should this (BAR isn't defined) */
-#define FOO (ICONST + BAR)
-
-/* The following statements also produce constants */
-%constant int iconst = 37;
-%constant double fconst = 3.14;
-
-
diff --git a/Examples/php5/constants/runme.php b/Examples/php5/constants/runme.php
deleted file mode 100644
index cea06485f..000000000
--- a/Examples/php5/constants/runme.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
diff --git a/Examples/php5/cpointer/Makefile b/Examples/php5/cpointer/Makefile
deleted file mode 100644
index 92085788a..000000000
--- a/Examples/php5/cpointer/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS = example.c
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/cpointer/example.c b/Examples/php5/cpointer/example.c
deleted file mode 100644
index 04dd08df0..000000000
--- a/Examples/php5/cpointer/example.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* File : example.c */
-
-void add(int *x, int *y, int *result) {
- *result = *x + *y;
-}
-
-void sub(int *x, int *y, int *result) {
- *result = *x - *y;
-}
-
-int divide(int n, int d, int *r) {
- int q;
- q = n/d;
- *r = n - q*d;
- return q;
-}
diff --git a/Examples/php5/cpointer/example.i b/Examples/php5/cpointer/example.i
deleted file mode 100644
index c61d92858..000000000
--- a/Examples/php5/cpointer/example.i
+++ /dev/null
@@ -1,31 +0,0 @@
-/* File : example.i */
-%module example
-
-%{
-extern void add(int *, int *, int *);
-extern void sub(int *, int *, int *);
-%}
-
-/* This example illustrates a couple of different techniques
- for manipulating C pointers */
-
-/* First we'll use the pointer library */
-extern void add(int *x, int *y, int *result);
-
-%include cpointer.i
-%pointer_functions(int, intp);
-
-/* Next we'll use some typemaps */
-
-%include typemaps.i
-extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
-
-/* Next we'll use typemaps and the %apply directive */
-
-//%apply int *OUTPUT { int *r };
-//extern int divide(int n, int d, int *r);
-
-
-
-
-
diff --git a/Examples/php5/cpointer/runme.php b/Examples/php5/cpointer/runme.php
deleted file mode 100644
index 22e8a681a..000000000
--- a/Examples/php5/cpointer/runme.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
diff --git a/Examples/php5/disown/Makefile b/Examples/php5/disown/Makefile
deleted file mode 100644
index 8346a1dae..000000000
--- a/Examples/php5/disown/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/disown/example.cxx b/Examples/php5/disown/example.cxx
deleted file mode 100644
index 6393735e9..000000000
--- a/Examples/php5/disown/example.cxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* File : example.c */
-
-#include "example.h"
-#include
-#ifndef M_PI
-# define M_PI 3.14159265358979323846
-#endif
-
-int Shape::get_nshapes() {
- return nshapes;
-}
-
-/* Move the shape to a new location */
-void Shape::move(double dx, double dy) {
- x += dx;
- y += dy;
-}
-
-int Shape::nshapes = 0;
-
-void Circle::set_radius( double r ) {
- radius = r;
-}
-
-double Circle::area(void) {
- return M_PI*radius*radius;
-}
-
-double Circle::perimeter(void) {
- return 2*M_PI*radius;
-}
-
-double Square::area(void) {
- return width*width;
-}
-
-double Square::perimeter(void) {
- return 4*width;
-}
-
-ShapeContainer::~ShapeContainer() {
- iterator i=shapes.begin();
- for( iterator i = shapes.begin(); i != shapes.end(); ++i ) {
- delete *i;
- }
-}
-
-void
-ShapeContainer::addShape( Shape *s ) {
- shapes.push_back( s );
-}
diff --git a/Examples/php5/disown/example.h b/Examples/php5/disown/example.h
deleted file mode 100644
index e9f96743f..000000000
--- a/Examples/php5/disown/example.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* File : example.h */
-
-#include
-
-class Shape {
-public:
- Shape() {
- nshapes++;
- }
- virtual ~Shape() {
- nshapes--;
- }
- double x, y;
- void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
- static int nshapes;
- static int get_nshapes();
-};
-
-class Circle : public Shape {
-private:
- double radius;
-public:
- Circle(double r) : radius(r) { }
- ~Circle() { }
- void set_radius( double r );
- virtual double area(void);
- virtual double perimeter(void);
-};
-
-class Square : public Shape {
-private:
- double width;
-public:
- Square(double w) : width(w) { }
- ~Square() { }
- virtual double area(void);
- virtual double perimeter(void);
-};
-
-class ShapeContainer {
-private:
- typedef std::vector::iterator iterator;
- std::vector shapes;
-public:
- ShapeContainer() : shapes() {}
- ~ShapeContainer();
- void addShape( Shape *s );
-};
diff --git a/Examples/php5/disown/example.i b/Examples/php5/disown/example.i
deleted file mode 100644
index 599f162c5..000000000
--- a/Examples/php5/disown/example.i
+++ /dev/null
@@ -1,12 +0,0 @@
-/* File : example.i */
-%module example
-
-%{
-#include "example.h"
-%}
-
-%apply SWIGTYPE *DISOWN {(Shape *s)};
-
-/* Let's just grab the original header file here */
-%include "example.h"
-
diff --git a/Examples/php5/disown/runme.php b/Examples/php5/disown/runme.php
deleted file mode 100644
index a70d7b061..000000000
--- a/Examples/php5/disown/runme.php
+++ /dev/null
@@ -1,49 +0,0 @@
-addShape($c);
-$container->addShape($s);
-
-# ----- Access a static member -----
-
-print "\nA total of " . Shape::nshapes() . " shapes were created\n";
-
-# ----- Delete by the old references -----
-# This should not truly delete the shapes because they are now owned
-# by the ShapeContainer.
-
-print "Delete the old references.";
-
-# Note: this invokes the virtual destructor
-$c = NULL;
-$s = NULL;
-
-print "\nA total of " . Shape::nshapes() . " shapes remain\n";
-
-# ----- Delete by the container -----
-# This should truly delete the shapes
-
-print "Delete the container.";
-$container = NULL;
-print "\nA total of " . Shape::nshapes() . " shapes remain\n";
-
-print "Goodbye\n";
-
-?>
diff --git a/Examples/php5/enum/Makefile b/Examples/php5/enum/Makefile
deleted file mode 100644
index dc59a6c9b..000000000
--- a/Examples/php5/enum/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT = -noproxy
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/enum/example.cxx b/Examples/php5/enum/example.cxx
deleted file mode 100644
index df7bb6328..000000000
--- a/Examples/php5/enum/example.cxx
+++ /dev/null
@@ -1,37 +0,0 @@
-/* File : example.cxx */
-
-#include "example.h"
-#include
-
-void Foo::enum_test(speed s) {
- if (s == IMPULSE) {
- printf("IMPULSE speed\n");
- } else if (s == WARP) {
- printf("WARP speed\n");
- } else if (s == LUDICROUS) {
- printf("LUDICROUS speed\n");
- } else {
- printf("Unknown speed\n");
- }
-}
-
-void enum_test(color c, Foo::speed s) {
- if (c == RED) {
- printf("color = RED, ");
- } else if (c == BLUE) {
- printf("color = BLUE, ");
- } else if (c == GREEN) {
- printf("color = GREEN, ");
- } else {
- printf("color = Unknown color!, ");
- }
- if (s == Foo::IMPULSE) {
- printf("speed = IMPULSE speed\n");
- } else if (s == Foo::WARP) {
- printf("speed = WARP speed\n");
- } else if (s == Foo::LUDICROUS) {
- printf("speed = LUDICROUS speed\n");
- } else {
- printf("speed = Unknown speed!\n");
- }
-}
diff --git a/Examples/php5/enum/example.h b/Examples/php5/enum/example.h
deleted file mode 100644
index 525d62afc..000000000
--- a/Examples/php5/enum/example.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* File : example.h */
-
-enum color { RED, BLUE, GREEN };
-
-class Foo {
- public:
- Foo() { }
- enum speed { IMPULSE, WARP, LUDICROUS };
- void enum_test(speed s);
-};
-
-void enum_test(color c, Foo::speed s);
-
diff --git a/Examples/php5/enum/example.i b/Examples/php5/enum/example.i
deleted file mode 100644
index abf254731..000000000
--- a/Examples/php5/enum/example.i
+++ /dev/null
@@ -1,12 +0,0 @@
-/* File : example.i */
-%module example
-
-%{
-#include "example.h"
-%}
-
-
-/* Let's just grab the original header file here */
-
-%include "example.h"
-
diff --git a/Examples/php5/enum/runme.php b/Examples/php5/enum/runme.php
deleted file mode 100644
index 55b0bc4c3..000000000
--- a/Examples/php5/enum/runme.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
diff --git a/Examples/php5/extend/Makefile b/Examples/php5/extend/Makefile
deleted file mode 100644
index 3a34106c3..000000000
--- a/Examples/php5/extend/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS = -lm
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/extend/example.cxx b/Examples/php5/extend/example.cxx
deleted file mode 100644
index 450d75608..000000000
--- a/Examples/php5/extend/example.cxx
+++ /dev/null
@@ -1,4 +0,0 @@
-/* File : example.cxx */
-
-#include "example.h"
-
diff --git a/Examples/php5/extend/example.h b/Examples/php5/extend/example.h
deleted file mode 100644
index ca1aed28f..000000000
--- a/Examples/php5/extend/example.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* File : example.h */
-
-#include
-#include
-#include
-#include
-#include
-
-class Employee {
-private:
- std::string name;
-public:
- Employee(const char* n): name(n) {}
- virtual std::string getTitle() { return getPosition() + " " + getName(); }
- virtual std::string getName() { return name; }
- virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
-};
-
-
-class Manager: public Employee {
-public:
- Manager(const char* n): Employee(n) {}
- virtual std::string getPosition() const { return "Manager"; }
-};
-
-
-class EmployeeList {
- std::vector list;
-public:
- EmployeeList() {
- list.push_back(new Employee("Bob"));
- list.push_back(new Employee("Jane"));
- list.push_back(new Manager("Ted"));
- }
- void addEmployee(Employee *p) {
- list.push_back(p);
- std::cout << "New employee added. Current employees are:" << std::endl;
- std::vector::iterator i;
- for (i=list.begin(); i!=list.end(); i++) {
- std::cout << " " << (*i)->getTitle() << std::endl;
- }
- }
- const Employee *get_item(int i) {
- return list[i];
- }
- ~EmployeeList() {
- std::vector::iterator i;
- std::cout << "~EmployeeList, deleting " << list.size() << " employees." << std::endl;
- for (i=list.begin(); i!=list.end(); i++) {
- delete *i;
- }
- std::cout << "~EmployeeList empty." << std::endl;
- }
-};
-
diff --git a/Examples/php5/extend/example.i b/Examples/php5/extend/example.i
deleted file mode 100644
index c8ec32e09..000000000
--- a/Examples/php5/extend/example.i
+++ /dev/null
@@ -1,15 +0,0 @@
-/* File : example.i */
-%module(directors="1") example
-%{
-#include "example.h"
-%}
-
-%include "std_vector.i"
-%include "std_string.i"
-
-/* turn on director wrapping for Manager */
-%feature("director") Employee;
-%feature("director") Manager;
-
-%include "example.h"
-
diff --git a/Examples/php5/extend/index.html b/Examples/php5/extend/index.html
deleted file mode 100644
index 32c6a4913..000000000
--- a/Examples/php5/extend/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-SWIG:Examples:php:extend
-
-
-
-
-
-SWIG/Examples/php/extend/
-
-
-Extending a simple C++ class in PHP
-
-
-This example illustrates the extending of a C++ class with cross language polymorphism.
-
-
-
-
diff --git a/Examples/php5/extend/runme.php b/Examples/php5/extend/runme.php
deleted file mode 100644
index 158683142..000000000
--- a/Examples/php5/extend/runme.php
+++ /dev/null
@@ -1,76 +0,0 @@
-getName() . " is a " . $e->getPosition() . "\n";
-printf("Just call her \"%s\"\n", $e->getTitle());
-print "----------------------\n";
-
-# Create a new EmployeeList instance. This class does not have a C++
-# director wrapper, but can be used freely with other classes that do.
-
-$list = new EmployeeList();
-
-# EmployeeList owns its items, so we must surrender ownership of objects
-# we add. This involves first clearing the ->disown member to tell the
-# C++ director to start reference counting.
-
-$e->thisown = 0;
-$list->addEmployee($e);
-print "----------------------\n";
-
-# Now we access the first four items in list (three are C++ objects that
-# EmployeeList's constructor adds, the last is our CEO). The virtual
-# methods of all these instances are treated the same. For items 0, 1, and
-# 2, both all methods resolve in C++. For item 3, our CEO, getTitle calls
-# getPosition which resolves in PHP. The call to getPosition is
-# slightly different, however, from the e.getPosition() call above, since
-# now the object reference has been "laundered" by passing through
-# EmployeeList as an Employee*. Previously, PHP resolved the call
-# immediately in CEO, but now PHP thinks the object is an instance of
-# class Employee (actually EmployeePtr). So the call passes through the
-# Employee proxy class and on to the C wrappers and C++ director,
-# eventually ending up back at the CEO implementation of getPosition().
-# The call to getTitle() for item 3 runs the C++ Employee::getTitle()
-# method, which in turn calls getPosition(). This virtual method call
-# passes down through the C++ director class to the PHP implementation
-# in CEO. All this routing takes place transparently.
-
-print "(position, title) for items 0-3:\n";
-
-printf(" %s, \"%s\"\n", $list->get_item(0)->getPosition(), $list->get_item(0)->getTitle());
-printf(" %s, \"%s\"\n", $list->get_item(1)->getPosition(), $list->get_item(1)->getTitle());
-printf(" %s, \"%s\"\n", $list->get_item(2)->getPosition(), $list->get_item(2)->getTitle());
-printf(" %s, \"%s\"\n", $list->get_item(3)->getPosition(), $list->get_item(3)->getTitle());
-print "----------------------\n";
-
-# Time to delete the EmployeeList, which will delete all the Employee*
-# items it contains. The last item is our CEO, which gets destroyed as its
-# reference count goes to zero. The PHP destructor runs, and is still
-# able to call the getName() method since the underlying C++ object still
-# exists. After this destructor runs the remaining C++ destructors run as
-# usual to destroy the object.
-
-unset($list);
-print "----------------------\n";
-
-# All done.
-
-print "php exit\n";
-
-?>
diff --git a/Examples/php5/funcptr/Makefile b/Examples/php5/funcptr/Makefile
deleted file mode 100644
index 92085788a..000000000
--- a/Examples/php5/funcptr/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS = example.c
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/funcptr/example.c b/Examples/php5/funcptr/example.c
deleted file mode 100644
index 99583b72e..000000000
--- a/Examples/php5/funcptr/example.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* File : example.c */
-
-int do_op(int a, int b, int (*op)(int,int)) {
- return (*op)(a,b);
-}
-
-int add(int a, int b) {
- return a+b;
-}
-
-int sub(int a, int b) {
- return a-b;
-}
-
-int mul(int a, int b) {
- return a*b;
-}
diff --git a/Examples/php5/funcptr/example.h b/Examples/php5/funcptr/example.h
deleted file mode 100644
index 58989db79..000000000
--- a/Examples/php5/funcptr/example.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* file: example.h */
-
-extern int do_op(int,int, int (*op)(int,int));
-extern int add(int,int);
-extern int sub(int,int);
-extern int mul(int,int);
-
diff --git a/Examples/php5/funcptr/example.i b/Examples/php5/funcptr/example.i
deleted file mode 100644
index 39390da27..000000000
--- a/Examples/php5/funcptr/example.i
+++ /dev/null
@@ -1,15 +0,0 @@
-/* File : example.i */
-%module example
-%{
-#include "example.h"
-%}
-
-/* Wrap a function taking a pointer to a function */
-extern int do_op(int a, int b, int (*op)(int, int));
-
-/* Now install a bunch of "ops" as constants */
-%constant int (*ADD)(int,int) = add;
-%constant int (*SUB)(int,int) = sub;
-%constant int (*MUL)(int,int) = mul;
-
-
diff --git a/Examples/php5/funcptr/runme.php b/Examples/php5/funcptr/runme.php
deleted file mode 100644
index 712d4147c..000000000
--- a/Examples/php5/funcptr/runme.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
diff --git a/Examples/php5/overloading/Makefile b/Examples/php5/overloading/Makefile
deleted file mode 100644
index 8346a1dae..000000000
--- a/Examples/php5/overloading/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/overloading/example.cxx b/Examples/php5/overloading/example.cxx
deleted file mode 100644
index 2f684f05c..000000000
--- a/Examples/php5/overloading/example.cxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* File : example.c */
-
-#include "example.h"
-#include
-#ifndef M_PI
-# define M_PI 3.14159265358979323846
-#endif
-
-int Shape::get_nshapes() {
- return nshapes;
-}
-
-/* Move the shape to a new location */
-void Shape::move(double dx, double dy) {
- x += dx;
- y += dy;
-}
-
-int Shape::nshapes = 0;
-
-double Circle::area(void) {
- return M_PI*radius*radius;
-}
-
-double Circle::perimeter(void) {
- return 2*M_PI*radius;
-}
-
-double Square::area(void) {
- return width*width;
-}
-
-double Square::perimeter(void) {
- return 4*width;
-}
-
-const char *overloaded(int i) {
- return "Overloaded with int";
-}
-
-const char *overloaded(double d) {
- return "Overloaded with double";
-}
-
-const char *overloaded(const char * str) {
- return "Overloaded with char *";
-}
-
-const char *overloaded( const Circle& ) {
- return "Overloaded with Circle";
-}
-
-const char *overloaded( const Shape& ) {
- return "Overloaded with Shape";
-}
diff --git a/Examples/php5/overloading/example.h b/Examples/php5/overloading/example.h
deleted file mode 100644
index 01d71dd70..000000000
--- a/Examples/php5/overloading/example.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* File : example.h */
-
-#include
-
-class Shape {
-public:
- Shape() {
- nshapes++;
- }
- virtual ~Shape() {
- nshapes--;
- }
- double x, y;
- void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
- static int nshapes;
- static int get_nshapes();
-};
-
-class Circle : public Shape {
-private:
- double radius;
-public:
- Circle(double r) : radius(r) { }
- ~Circle() { }
- virtual double area(void);
- virtual double perimeter(void);
-};
-
-class Square : public Shape {
-private:
- double width;
-public:
- Square(double w) : width(w) { }
- ~Square() { }
- virtual double area(void);
- virtual double perimeter(void);
-};
-
-const char *overloaded( int i );
-const char *overloaded( double d );
-const char *overloaded( const char * str );
-const char *overloaded( const Circle& );
-const char *overloaded( const Shape& );
-
diff --git a/Examples/php5/overloading/example.i b/Examples/php5/overloading/example.i
deleted file mode 100644
index 950d2549d..000000000
--- a/Examples/php5/overloading/example.i
+++ /dev/null
@@ -1,8 +0,0 @@
-/* File : example.i */
-%module example
-
-%{
-#include "example.h"
-%}
-
-%include "example.h"
diff --git a/Examples/php5/overloading/runme.php b/Examples/php5/overloading/runme.php
deleted file mode 100644
index 56d515138..000000000
--- a/Examples/php5/overloading/runme.php
+++ /dev/null
@@ -1,58 +0,0 @@
-x = 20;
-$c->y = 30;
-$s->x = -10;
-$s->y = 5;
-
-print "\nHere is their current position:\n";
-print " Circle = (" . $c->x . "," . $c->y . ")\n";
-print " Square = (" . $s->x . "," . $s->y . ")\n";
-
-# ----- Call some methods -----
-
-print "\nCall some overloaded methods:\n";
-foreach (array(1, 2.1, "quick brown fox", $c, $s) as $o) {
- print " overloaded = " . overloaded($o) . "\n";
-}
-
-# Need to unset($o) or else we hang on to a reference to the Square object.
-unset($o);
-
-# ----- Delete everything -----
-
-print "\nGuess I'll clean up now\n";
-
-# Note: this invokes the virtual destructor
-unset($c);
-$s = 42;
-
-print Shape::nshapes() . " shapes remain\n";
-
-print "Goodbye\n";
-
-?>
diff --git a/Examples/php5/pointer/Makefile b/Examples/php5/pointer/Makefile
deleted file mode 100644
index 92085788a..000000000
--- a/Examples/php5/pointer/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS = example.c
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/pointer/example.c b/Examples/php5/pointer/example.c
deleted file mode 100644
index 3326dec3e..000000000
--- a/Examples/php5/pointer/example.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* File : example.c */
-
-void add(double *x, double *y, double *result) {
- *result = *x + *y;
-}
-
-void sub(int *x, int *y, int *result) {
- *result = *x - *y;
-}
-
-int divide(int n, int d, int *r) {
- int q;
- q = n/d;
- *r = n - q*d;
- return q;
-}
diff --git a/Examples/php5/pointer/example.i b/Examples/php5/pointer/example.i
deleted file mode 100644
index 1f0059406..000000000
--- a/Examples/php5/pointer/example.i
+++ /dev/null
@@ -1,30 +0,0 @@
-/* File : example.i */
-%module example
-
-%{
-extern void add(double *, double *, double *);
-extern void sub(int *, int *, int *);
-extern int divide(int, int, int *);
-%}
-
-/* This example illustrates a couple of different techniques
- for manipulating C pointers */
-
-%include phppointers.i
-/* First we'll use the pointer library */
-extern void add(double *REF, double *REF, double *REF);
-
-/* Next we'll use some typemaps */
-
-%include typemaps.i
-extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
-
-/* Next we'll use typemaps and the %apply directive */
-
-//%apply int *OUTPUT { int *r };
-//extern int divide(int n, int d, int *r);
-
-
-
-
-
diff --git a/Examples/php5/pointer/runme.php b/Examples/php5/pointer/runme.php
deleted file mode 100644
index e79b23810..000000000
--- a/Examples/php5/pointer/runme.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
diff --git a/Examples/php5/pragmas/Makefile b/Examples/php5/pragmas/Makefile
deleted file mode 100644
index f9557fa89..000000000
--- a/Examples/php5/pragmas/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS =
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/pragmas/example.i b/Examples/php5/pragmas/example.i
deleted file mode 100644
index f9307a663..000000000
--- a/Examples/php5/pragmas/example.i
+++ /dev/null
@@ -1,32 +0,0 @@
-/* File : example.i */
-%module example
-
-%init{
- zend_printf("This was %%init\n");
-}
-
-%minit{
- zend_printf("This was %%minit\n");
-}
-
-%mshutdown{
- zend_printf("This was %%shutdown\n");
-}
-
-%rinit{
- zend_printf("This was %%rinit\n");
-}
-
-%rshutdown{
- zend_printf("This was %%rshutdown\n");
-}
-
-%pragma(php) include="include.php";
-
-%pragma(php) code="
-# This code is inserted into example.php
-echo \"this was php code\\n\";
-"
-%pragma(php) version="1.5"
-
-%pragma(php) phpinfo="php_info_print_table_start();"
diff --git a/Examples/php5/pragmas/include.php b/Examples/php5/pragmas/include.php
deleted file mode 100644
index e19880a06..000000000
--- a/Examples/php5/pragmas/include.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/Examples/php5/pragmas/runme.php b/Examples/php5/pragmas/runme.php
deleted file mode 100644
index b99cf37a4..000000000
--- a/Examples/php5/pragmas/runme.php
+++ /dev/null
@@ -1,6 +0,0 @@
-getVersion());
-?>
diff --git a/Examples/php5/proxy/Makefile b/Examples/php5/proxy/Makefile
deleted file mode 100644
index 8346a1dae..000000000
--- a/Examples/php5/proxy/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/proxy/example.cxx b/Examples/php5/proxy/example.cxx
deleted file mode 100644
index 94e4a7888..000000000
--- a/Examples/php5/proxy/example.cxx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* File : example.c */
-
-#include "example.h"
-#include
-#ifndef M_PI
-# define M_PI 3.14159265358979323846
-#endif
-
-int Shape::get_nshapes() {
- return nshapes;
-}
-
-/* Move the shape to a new location */
-void Shape::move(double dx, double dy) {
- x += dx;
- y += dy;
-}
-
-int Shape::nshapes = 0;
-
-void Circle::set_radius( double r ) {
- radius = r;
-}
-
-double Circle::area(void) {
- return M_PI*radius*radius;
-}
-
-double Circle::perimeter(void) {
- return 2*M_PI*radius;
-}
-
-double Square::area(void) {
- return width*width;
-}
-
-double Square::perimeter(void) {
- return 4*width;
-}
-
-Circle *CircleFactory( double r ) {
- return new Circle(r);
-}
diff --git a/Examples/php5/proxy/example.h b/Examples/php5/proxy/example.h
deleted file mode 100644
index 0683f07f3..000000000
--- a/Examples/php5/proxy/example.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* File : example.h */
-
-#include
-
-class Shape {
-public:
- Shape() {
- nshapes++;
- }
- virtual ~Shape() {
- nshapes--;
- }
- double x, y;
- void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
- static int nshapes;
- static int get_nshapes();
-};
-
-class Circle : public Shape {
-private:
- double radius;
-public:
- Circle(double r) : radius(r) { }
- ~Circle() { }
- void set_radius( double r );
- virtual double area(void);
- virtual double perimeter(void);
-};
-
-class Square : public Shape {
-private:
- double width;
-public:
- Square(double w) : width(w) { }
- ~Square() { }
- virtual double area(void);
- virtual double perimeter(void);
-};
-
-Circle *CircleFactory( double r );
-
diff --git a/Examples/php5/proxy/example.i b/Examples/php5/proxy/example.i
deleted file mode 100644
index ce73746d0..000000000
--- a/Examples/php5/proxy/example.i
+++ /dev/null
@@ -1,12 +0,0 @@
-/* File : example.i */
-%module example
-
-%{
-#include "example.h"
-%}
-
-/* Let's just grab the original header file here */
-
-%newobject CircleFactory;
-%include "example.h"
-
diff --git a/Examples/php5/proxy/runme.php b/Examples/php5/proxy/runme.php
deleted file mode 100644
index e70ab229f..000000000
--- a/Examples/php5/proxy/runme.php
+++ /dev/null
@@ -1,68 +0,0 @@
-area() ."\n";
-$s = new Square(10);
-print " Created square \$s\n";
-
-# ----- Access a static member -----
-
-print "\nA total of " . Shape::nshapes() . " shapes were created\n";
-
-# ----- Member data access -----
-
-# Set the location of the object.
-# Note: methods in the base class Shape are used since
-# x and y are defined there.
-
-$c->x = 20;
-$c->y = 30;
-$s->x = -10;
-$s->y = 5;
-
-print "\nHere is their current position:\n";
-print " Circle = (" . $c->x . "," . $c->y . ")\n";
-print " Square = (" . $s->x . "," . $s->y . ")\n";
-
-# ----- Call some methods -----
-
-print "\nHere are some properties of the shapes:\n";
-foreach (array($c,$s) as $o) {
- print " ".get_class($o)." \$o\n";
- print " x = " . $o->x . "\n";
- print " y = " . $o->y . "\n";
- print " area = " . $o->area() . "\n";
- print " perimeter = " . $o->perimeter() . "\n";
- }
-
-# Need to unset($o) or else we hang on to a reference to the Square object.
-unset($o);
-
-# ----- Delete everything -----
-
-print "\nGuess I'll clean up now\n";
-
-# Note: this invokes the virtual destructor
-unset($c);
-$s = 42;
-
-print Shape::nshapes() . " shapes remain\n";
-
-print "Manually setting nshapes\n";
-
-Shape::nshapes(42);
-
-print Shape::get_nshapes() ." == 42\n";
-
-print "Goodbye\n";
-
-?>
diff --git a/Examples/php5/reference/Makefile b/Examples/php5/reference/Makefile
deleted file mode 100644
index 8346a1dae..000000000
--- a/Examples/php5/reference/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/reference/example.cxx b/Examples/php5/reference/example.cxx
deleted file mode 100644
index 7ead7fbf6..000000000
--- a/Examples/php5/reference/example.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* File : example.cxx */
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-#include "example.h"
-#include
-#include
-
-Vector operator+(const Vector &a, const Vector &b) {
- Vector r;
- r.x = a.x + b.x;
- r.y = a.y + b.y;
- r.z = a.z + b.z;
- return r;
-}
-
-char *Vector::as_string() {
- static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
- return temp;
-}
-
-VectorArray::VectorArray(int size) {
- items = new Vector[size];
- maxsize = size;
- printf("VectorArray new: self=%p\n", (void *)this);
-}
-
-VectorArray::~VectorArray() {
- printf("VectorArray delete: self=%p\n", (void *)this);
- delete [] items;
-}
-
-Vector &VectorArray::operator[](int index) {
- printf("VectorArray: read[%d] self=%p\n", index, (void *)this);
- if ((index < 0) || (index >= maxsize)) {
- printf("Panic! Array index out of bounds.\n");
- exit(1);
- }
- return items[index];
-}
-
-int VectorArray::size() {
- printf("VectorArray: size %d self=%p\n", maxsize, (void *)this);
- return maxsize;
-}
diff --git a/Examples/php5/reference/example.h b/Examples/php5/reference/example.h
deleted file mode 100644
index 353b88835..000000000
--- a/Examples/php5/reference/example.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* File : example.h */
-
-class Vector {
-private:
- double x,y,z;
-public:
- Vector() : x(0), y(0), z(0) { }
- Vector(double x, double y, double z) : x(x), y(y), z(z) { }
- friend Vector operator+(const Vector &a, const Vector &b);
- char *as_string();
-};
-
-class VectorArray {
-private:
- Vector *items;
- int maxsize;
-public:
- VectorArray(int maxsize);
- ~VectorArray();
- Vector &operator[](int);
- int size();
-};
diff --git a/Examples/php5/reference/example.i b/Examples/php5/reference/example.i
deleted file mode 100644
index df1459921..000000000
--- a/Examples/php5/reference/example.i
+++ /dev/null
@@ -1,43 +0,0 @@
-/* File : example.i */
-
-/* This file has a few "typical" uses of C++ references. */
-
-%module example
-
-%{
-#include "example.h"
-%}
-
-class Vector {
-public:
- Vector(double x, double y, double z);
- ~Vector();
- char *as_string();
-};
-
-/* This helper function calls an overloaded operator */
-%inline %{
-Vector addv(Vector &a, Vector &b) {
- return a+b;
-}
-%}
-
-/* Wrapper around an array of vectors class */
-
-class VectorArray {
-public:
- VectorArray(int maxsize);
- ~VectorArray();
- int size();
-
- /* This wrapper provides an alternative to the [] operator */
- %extend {
- Vector &get(int index) {
- printf("VectorArray extended get: %p %d\n", (void *)$self, index);
- return (*$self)[index];
- }
- void set(int index, Vector &a) {
- (*$self)[index] = a;
- }
- }
-};
diff --git a/Examples/php5/reference/runme.php b/Examples/php5/reference/runme.php
deleted file mode 100644
index 5d264ee43..000000000
--- a/Examples/php5/reference/runme.php
+++ /dev/null
@@ -1,49 +0,0 @@
-as_string()}\n";
-print " Created b: {$b->as_string()}\n";
-
-# ----- Call an overloaded operator -----
-
-# This calls the wrapper we placed around
-#
-# operator+(const Vector &a, const Vector &)
-#
-# It returns a new allocated object.
-
-print "Adding a+b\n";
-$c = example::addv($a, $b);
-print " a+b ={$c->as_string()}\n";
-
-# ----- Create a vector array -----
-
-print "Creating an array of vectors\n";
-$va = new VectorArray(10);
-
-print " va: size={$va->size()}\n";
-
-# ----- Set some values in the array -----
-
-# These operators copy the value of $a and $b to the vector array
-$va->set(0, $a);
-$va->set(1, $b);
-$va->set(2, addv($a, $b));
-
-# Get some values from the array
-
-print "Getting some array values\n";
-for ($i = 0; $i < 5; $i++) {
- print " va[$i] = {$va->get($i)->as_string()}\n";
-}
-
-?>
diff --git a/Examples/php5/simple/Makefile b/Examples/php5/simple/Makefile
deleted file mode 100644
index 92085788a..000000000
--- a/Examples/php5/simple/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS = example.c
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/simple/example.c b/Examples/php5/simple/example.c
deleted file mode 100644
index 2fe275632..000000000
--- a/Examples/php5/simple/example.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* File : example.c */
-#include
-
-/* A global variable */
-double Foo = 3.0;
-
-void print_Foo() {
- printf("In C, Foo = %f\n",Foo);
-}
-
-/* Compute the greatest common divisor of positive integers */
-int gcd(int x, int y) {
- int g;
- g = y;
- while (x > 0) {
- g = x;
- x = y % x;
- y = g;
- }
- return g;
-}
-
-
diff --git a/Examples/php5/simple/example.i b/Examples/php5/simple/example.i
deleted file mode 100644
index 9d4e22aa9..000000000
--- a/Examples/php5/simple/example.i
+++ /dev/null
@@ -1,8 +0,0 @@
-/* File : example.i */
-%module example
-
-%inline %{
-extern int gcd(int x, int y);
-extern double Foo;
-void print_Foo();
-%}
diff --git a/Examples/php5/simple/runme.php b/Examples/php5/simple/runme.php
deleted file mode 100644
index 0e96fe800..000000000
--- a/Examples/php5/simple/runme.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
diff --git a/Examples/php5/sync/Makefile b/Examples/php5/sync/Makefile
deleted file mode 100644
index 8346a1dae..000000000
--- a/Examples/php5/sync/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-CXXSRCS = example.cxx
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5_cpp
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/sync/example.cxx b/Examples/php5/sync/example.cxx
deleted file mode 100644
index 0942279b2..000000000
--- a/Examples/php5/sync/example.cxx
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "example.h"
-#include
-
-int x = 42;
-char *s = (char *)"Test";
-
-void Sync::printer(void) {
-
- printf("The value of global s is %s\n", s);
- printf("The value of global x is %d\n", x);
- printf("The value of class s is %s\n", s);
- printf("The value of class x is %d\n", x);
-}
diff --git a/Examples/php5/sync/example.h b/Examples/php5/sync/example.h
deleted file mode 100644
index d67ec21dc..000000000
--- a/Examples/php5/sync/example.h
+++ /dev/null
@@ -1,9 +0,0 @@
-extern char *s;
-extern int x;
-
-class Sync {
- public:
- int x;
- char *s;
- void printer(void);
-};
diff --git a/Examples/php5/sync/example.i b/Examples/php5/sync/example.i
deleted file mode 100644
index 17ff87cf3..000000000
--- a/Examples/php5/sync/example.i
+++ /dev/null
@@ -1,7 +0,0 @@
-%module example
-
-%{
-#include "example.h"
-%}
-
-%include "example.h"
diff --git a/Examples/php5/sync/runme.php b/Examples/php5/sync/runme.php
deleted file mode 100644
index a7c43474f..000000000
--- a/Examples/php5/sync/runme.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-// Load module and PHP classes.
-include("example.php");
-
-echo "Got new object\n";
-echo "Got string $s and value $x \n";
-
-$s = new Sync();
-echo "Got new object\n";
-
-$s->printer();
-
-?>
-
diff --git a/Examples/php5/value/Makefile b/Examples/php5/value/Makefile
deleted file mode 100644
index b0b5e20ac..000000000
--- a/Examples/php5/value/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS = example.c
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT = -noproxy
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/value/example.c b/Examples/php5/value/example.c
deleted file mode 100644
index 3c402a214..000000000
--- a/Examples/php5/value/example.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* File : example.c */
-
-#include "example.h"
-
-double dot_product(Vector a, Vector b) {
- return (a.x*b.x + a.y*b.y + a.z*b.z);
-}
-
-void vector_add(Vector a, Vector b, Vector* result) {
- result->x = a.x + b.x;
- result->y = a.y + b.y;
- result->z = a.z + b.z;
-}
diff --git a/Examples/php5/value/example.h b/Examples/php5/value/example.h
deleted file mode 100644
index f55752a5f..000000000
--- a/Examples/php5/value/example.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* File : example.h */
-
-typedef struct {
- double x, y, z;
-} Vector;
-
-double dot_product(Vector a, Vector b);
-void vector_add(Vector a, Vector b, Vector* result);
diff --git a/Examples/php5/value/example.i b/Examples/php5/value/example.i
deleted file mode 100644
index 20a453468..000000000
--- a/Examples/php5/value/example.i
+++ /dev/null
@@ -1,17 +0,0 @@
-// Tests SWIG's handling of pass-by-value for complex datatypes
-%module example
-
-%{
-#include "example.h"
-%}
-
-%include "example.h"
-
-/* Some helper functions for our interface */
-%inline %{
-
-void vector_print(Vector *v) {
- printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z);
-}
-%}
-
diff --git a/Examples/php5/value/runme.php b/Examples/php5/value/runme.php
deleted file mode 100644
index 49115376c..000000000
--- a/Examples/php5/value/runme.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
diff --git a/Examples/php5/variables/Makefile b/Examples/php5/variables/Makefile
deleted file mode 100644
index 92085788a..000000000
--- a/Examples/php5/variables/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-TOP = ../..
-SWIGEXE = $(TOP)/../swig
-SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
-SRCS = example.c
-TARGET = example
-INTERFACE = example.i
-LIBS =
-SWIGOPT =
-
-check: build
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_run
-
-build:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
- SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
- SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
- php5
-
-clean:
- $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php5_clean
diff --git a/Examples/php5/variables/example.c b/Examples/php5/variables/example.c
deleted file mode 100644
index d4c6d026d..000000000
--- a/Examples/php5/variables/example.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* File : example.c */
-
-/* I'm a file containing some C global variables */
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-#include
-#include
-#include "example.h"
-
-int ivar = 0;
-short svar = 0;
-long lvar = 0;
-unsigned int uivar = 0;
-unsigned short usvar = 0;
-unsigned long ulvar = 0;
-signed char scvar = 0;
-unsigned char ucvar = 0;
-char cvar = 0;
-float fvar = 0;
-double dvar = 0;
-char *strvar = 0;
-const char cstrvar[] = "Goodbye";
-int *iptrvar = 0;
-char name[5] = "Dave";
-char path[256] = "/home/beazley";
-
-
-/* Global variables involving a structure */
-Point *ptptr = 0;
-Point pt = { 10, 20 };
-
-/* A variable that we will make read-only in the interface */
-int status = 1;
-
-/* A debugging function to print out their values */
-
-void print_vars() {
- printf("ivar = %d\n", ivar);
- printf("svar = %d\n", svar);
- printf("lvar = %ld\n", lvar);
- printf("uivar = %u\n", uivar);
- printf("usvar = %u\n", usvar);
- printf("ulvar = %lu\n", ulvar);
- printf("scvar = %d\n", scvar);
- printf("ucvar = %u\n", ucvar);
- printf("fvar = %g\n", fvar);
- printf("dvar = %g\n", dvar);
- printf("cvar = %c\n", cvar);
- printf("strvar = %s\n", strvar ? strvar : "(null)");
- printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", (void *)iptrvar);
- printf("name = %c%c%c%c%c\n", name[0],name[1],name[2],name[3],name[4]);
- printf("ptptr = %p %s\n", (void *)ptptr, Point_print( ptptr ) );
- printf("pt = (%d, %d)\n", pt.x, pt.y);
- printf("status = %d\n", status);
-}
-
-/* A function to create an integer (to test iptrvar) */
-
-int *new_int(int value) {
- int *ip = (int *) malloc(sizeof(int));
- *ip = value;
- return ip;
-}
-
-int value_int(int *value) {
- return *value;
-}
-
-/* A function to create a point */
-
-Point *new_Point(int x, int y) {
- Point *p = (Point *) malloc(sizeof(Point));
- p->x = x;
- p->y = y;
- return p;
-}
-
-char * Point_print(Point *p) {
- static char buffer[256];
- if (p) {
- sprintf(buffer,"(%d,%d)", p->x,p->y);
- } else {
- sprintf(buffer,"null");
- }
- return buffer;
-}
-
-void pt_print() {
- printf("(%d, %d)\n", pt.x, pt.y);
-}
diff --git a/Examples/php5/variables/example.h b/Examples/php5/variables/example.h
deleted file mode 100644
index 3b3659ce5..000000000
--- a/Examples/php5/variables/example.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* File: example.h */
-
-typedef struct {
- int x,y;
-} Point;
-
-/* Some global variable declarations */
-extern int ivar;
-extern short svar;
-extern long lvar;
-extern unsigned int uivar;
-extern unsigned short usvar;
-extern unsigned long ulvar;
-extern signed char scvar;
-extern unsigned char ucvar;
-extern char cvar;
-extern float fvar;
-extern double dvar;
-extern char *strvar;
-extern const char cstrvar[];
-extern int *iptrvar;
-extern char name[5];
-
-extern Point *ptptr;
-extern Point pt;
-
-extern int status;
-extern char path[256];
-
-extern void print_vars();
-extern int *new_int(int value);
-extern Point *new_Point(int x, int y);
-extern char *Point_print(Point *p);
-extern void pt_print();
diff --git a/Examples/php5/variables/example.i b/Examples/php5/variables/example.i
deleted file mode 100644
index 3edbb72d7..000000000
--- a/Examples/php5/variables/example.i
+++ /dev/null
@@ -1,44 +0,0 @@
-/* File : example.i */
-%module example
-%{
-#include "example.h"
-%}
-
-/* Some global variable declarations */
-extern int ivar;
-extern short svar;
-extern long lvar;
-extern unsigned int uivar;
-extern unsigned short usvar;
-extern unsigned long ulvar;
-extern signed char scvar;
-extern unsigned char ucvar;
-extern char cvar;
-extern float fvar;
-extern double dvar;
-extern char *strvar;
-extern const char cstrvar[];
-extern int *iptrvar;
-extern char name[5];
-
-extern Point *ptptr;
-extern Point pt;
-
-/* Some read-only variables */
-
-%immutable;
-extern int status;
-extern char path[256];
-%mutable;
-
-/* Some helper functions to make it easier to test */
-extern void print_vars();
-extern int *new_int(int value);
-
-extern Point *new_Point(int x, int y);
-extern char *Point_print(Point *p);
-extern void pt_print();
-
-
-
-
diff --git a/Examples/php5/variables/runme.php b/Examples/php5/variables/runme.php
deleted file mode 100644
index 14f27f389..000000000
--- a/Examples/php5/variables/runme.php
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
diff --git a/Examples/test-suite/php5/Makefile.in b/Examples/test-suite/php5/Makefile.in
deleted file mode 100644
index 179ce59d6..000000000
--- a/Examples/test-suite/php5/Makefile.in
+++ /dev/null
@@ -1,81 +0,0 @@
-#######################################################################
-# Makefile for php5 test-suite
-#######################################################################
-
-LANGUAGE = php5
-SCRIPTSUFFIX = _runme.php
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = @top_builddir@
-
-CPP_TEST_CASES += \
- callback \
- li_factory \
- php_iterator \
- php_namewarn_rename \
- php_pragma \
-
-include $(srcdir)/../common.mk
-
-# Overridden variables here
-TARGETPREFIX =# Should be php_ for Windows, empty otherwise
-
-# Custom tests - tests with additional commandline options
-prefix.cpptest: SWIGOPT += -prefix Project
-
-# write out tests without a _runme.php
-missingcpptests:
- for test in $(CPP_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done
-
-missingctests:
- for test in $(C_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done
-
-missingtests: missingcpptests missingctests
-
-# Rules for the different types of tests
-%.cpptest:
- $(setup)
- +$(swig_and_compile_cpp)
- +$(run_testcase)
-
-%.ctest:
- $(setup)
- +$(swig_and_compile_c)
- +$(run_testcase)
-
-%.multicpptest:
- $(setup)
- +$(swig_and_compile_multi_cpp)
- +$(run_testcase)
-
-# Smart target
-%.test:
- @echo ' $(C_TEST_CASES) '|grep -F -v ' $* ' >/dev/null ||\
- $(MAKE) $*.ctest
- @echo ' $(CPP_TEST_CASES) '|grep -F -v ' $* ' >/dev/null ||\
- $(MAKE) $*.cpptest
- @echo ' $(MULTI_CPP_TEST_CASES) '|grep -F -v ' $* ' >/dev/null ||\
- $(MAKE) $*.multicpptest
-
-# Runs the testcase. Tries to run testcase_runme.php, and if that's not
-# found, runs testcase.php, except for multicpptests.
-run_testcase = \
- if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP5_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL='$(RUNTOOL)' php5_run; \
- elif [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*.php -a ! -f $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list ]; then \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP5_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*.php RUNTOOL='$(RUNTOOL)' php5_run; \
- fi
-
-# Clean: remove the generated .php file
-%.clean:
- @rm -f $*.php php_$*.h
-
-clean:
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' php5_clean
- rm -f clientdata_prop_a.php clientdata_prop_b.php php_clientdata_prop_a.h php_clientdata_prop_b.h
- rm -f import_stl_a.php import_stl_b.php php_import_stl_a.h php_import_stl_b.h
- rm -f imports_a.php imports_b.php php_imports_a.h php_imports_b.h
- rm -f mod_a.php mod_b.php php_mod_a.h php_mod_b.h
- rm -f multi_import_a.php multi_import_b.php php_multi_import_a.h php_multi_import_b.h
- rm -f packageoption_a.php packageoption_b.php packageoption_c.php php_packageoption_a.h php_packageoption_b.h php_packageoption_c.h
diff --git a/Examples/test-suite/php5/abstract_inherit_ok_runme.php b/Examples/test-suite/php5/abstract_inherit_ok_runme.php
deleted file mode 100644
index c2d86499b..000000000
--- a/Examples/test-suite/php5/abstract_inherit_ok_runme.php
+++ /dev/null
@@ -1,12 +0,0 @@
-blah(),"spam object method");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/abstract_inherit_runme.php b/Examples/test-suite/php5/abstract_inherit_runme.php
deleted file mode 100644
index 3554e6fd8..000000000
--- a/Examples/test-suite/php5/abstract_inherit_runme.php
+++ /dev/null
@@ -1,14 +0,0 @@
-blah(),"spam object method");
-//check::equal(0,Spam::blah($spam),"spam class method");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/add_link_runme.php b/Examples/test-suite/php5/add_link_runme.php
deleted file mode 100644
index 7523bd604..000000000
--- a/Examples/test-suite/php5/add_link_runme.php
+++ /dev/null
@@ -1,22 +0,0 @@
-blah();
-check::is_a($foo_blah,foo);
-
-//fails, can't be called as a class method, should allow and make it nil?
-//$class_foo_blah=foo::blah();
-//check::is_a($class_foo_blah,foo);
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/argout_runme.php b/Examples/test-suite/php5/argout_runme.php
deleted file mode 100644
index 33fbd8129..000000000
--- a/Examples/test-suite/php5/argout_runme.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
diff --git a/Examples/test-suite/php5/arrayptr_runme.php b/Examples/test-suite/php5/arrayptr_runme.php
deleted file mode 100644
index 3b9baed05..000000000
--- a/Examples/test-suite/php5/arrayptr_runme.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
diff --git a/Examples/test-suite/php5/arrays_global_runme.php b/Examples/test-suite/php5/arrays_global_runme.php
deleted file mode 100644
index 12a7806c9..000000000
--- a/Examples/test-suite/php5/arrays_global_runme.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
diff --git a/Examples/test-suite/php5/arrays_global_twodim_runme.php b/Examples/test-suite/php5/arrays_global_twodim_runme.php
deleted file mode 100644
index 40ecf1719..000000000
--- a/Examples/test-suite/php5/arrays_global_twodim_runme.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
diff --git a/Examples/test-suite/php5/arrays_runme.php b/Examples/test-suite/php5/arrays_runme.php
deleted file mode 100644
index ae17d05e7..000000000
--- a/Examples/test-suite/php5/arrays_runme.php
+++ /dev/null
@@ -1,18 +0,0 @@
-array_c="abc";
-check::equal($as->array_c,"a",'$as->array_c=="a"');
-check::equal(isset($as->array_const_i),TRUE,'isset($as->array_const_i)');
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/arrays_scope_runme.php b/Examples/test-suite/php5/arrays_scope_runme.php
deleted file mode 100644
index c208b7518..000000000
--- a/Examples/test-suite/php5/arrays_scope_runme.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/Examples/test-suite/php5/callback_runme.php b/Examples/test-suite/php5/callback_runme.php
deleted file mode 100644
index fefa32502..000000000
--- a/Examples/test-suite/php5/callback_runme.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/Examples/test-suite/php5/casts_runme.php b/Examples/test-suite/php5/casts_runme.php
deleted file mode 100644
index 10522dca4..000000000
--- a/Examples/test-suite/php5/casts_runme.php
+++ /dev/null
@@ -1,18 +0,0 @@
-hello();
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/char_strings_runme.php b/Examples/test-suite/php5/char_strings_runme.php
deleted file mode 100644
index e06ee9d2b..000000000
--- a/Examples/test-suite/php5/char_strings_runme.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
diff --git a/Examples/test-suite/php5/class_ignore_runme.php b/Examples/test-suite/php5/class_ignore_runme.php
deleted file mode 100644
index d5ce36217..000000000
--- a/Examples/test-suite/php5/class_ignore_runme.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/Examples/test-suite/php5/conversion_namespace_runme.php b/Examples/test-suite/php5/conversion_namespace_runme.php
deleted file mode 100644
index e21ff7438..000000000
--- a/Examples/test-suite/php5/conversion_namespace_runme.php
+++ /dev/null
@@ -1,13 +0,0 @@
-toFoo();
-check::classname("foo",$foo);
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/conversion_ns_template_runme.php b/Examples/test-suite/php5/conversion_ns_template_runme.php
deleted file mode 100644
index 9702eedb7..000000000
--- a/Examples/test-suite/php5/conversion_ns_template_runme.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/Examples/test-suite/php5/conversion_runme.php b/Examples/test-suite/php5/conversion_runme.php
deleted file mode 100644
index 1a10ff4f4..000000000
--- a/Examples/test-suite/php5/conversion_runme.php
+++ /dev/null
@@ -1,13 +0,0 @@
-toFoo();
-check::classname("foo",$foo);
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/cpp11_strongly_typed_enumerations_runme.php b/Examples/test-suite/php5/cpp11_strongly_typed_enumerations_runme.php
deleted file mode 100644
index bee59b209..000000000
--- a/Examples/test-suite/php5/cpp11_strongly_typed_enumerations_runme.php
+++ /dev/null
@@ -1,169 +0,0 @@
-class1Test1(Enum1_Val5a), 13);
-enumCheck($class1->class1Test2(Class1::Enum12_Val5c), 1121);
-#enumCheck($class1.class1Test3(Class1::Struct1.Enum12_Val5f), 3121);
-
-enumCheck(globalTest1(Enum1_Val5a), 13);
-enumCheck(globalTest2(Class1::Enum12_Val5c), 1121);
-#enumCheck(globalTest3(Class1::Struct1.Enum12_Val5f), 3121);
-
-?>
diff --git a/Examples/test-suite/php5/cpp_basic_runme.php b/Examples/test-suite/php5/cpp_basic_runme.php
deleted file mode 100644
index 6a8522e3e..000000000
--- a/Examples/test-suite/php5/cpp_basic_runme.php
+++ /dev/null
@@ -1,20 +0,0 @@
-func_ptr = get_func1_ptr();
-check::equal(test_func_ptr($f, 7), 2*7*3, "get_func1_ptr() didn't work");
-$f->func_ptr = get_func2_ptr();
-check::equal(test_func_ptr($f, 7), -7*3, "get_func2_ptr() didn't work");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/cpp_static_runme.php b/Examples/test-suite/php5/cpp_static_runme.php
deleted file mode 100644
index 9b436b87c..000000000
--- a/Examples/test-suite/php5/cpp_static_runme.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
diff --git a/Examples/test-suite/php5/director_abstract_runme.php b/Examples/test-suite/php5/director_abstract_runme.php
deleted file mode 100644
index ca3d676da..000000000
--- a/Examples/test-suite/php5/director_abstract_runme.php
+++ /dev/null
@@ -1,62 +0,0 @@
-ping(), "MyFoo::ping()", "MyFoo::ping failed");
-
-check::equal($a->pong(), "Foo::pong();MyFoo::ping()", "MyFoo::pong failed");
-
-class MyExample1 extends Example1 {
- function Color($r, $g, $b) {
- return $r;
- }
-}
-
-class MyExample2 extends Example1 {
- function Color($r, $g, $b) {
- return $g;
- }
-}
-
-class MyExample3 extends Example1 {
- function Color($r, $g, $b) {
- return $b;
- }
-}
-
-$me1 = new MyExample1();
-check::equal($me1->Color(1, 2, 3), 1, "Example1_get_color failed");
-
-$me2 = new MyExample2(1, 2);
-check::equal($me2->Color(1, 2, 3), 2, "Example2_get_color failed");
-
-$me3 = new MyExample3();
-check::equal($me3->Color(1, 2, 3), 3, "Example3_get_color failed");
-
-$class = new ReflectionClass('Example1');
-check::equal($class->isAbstract(), true, "Example1 abstractness failed");
-
-$class = new ReflectionClass('Example2');
-check::equal($class->isAbstract(), true, "Example2 abstractness failed");
-
-$class = new ReflectionClass('Example3_i');
-check::equal($class->isAbstract(), true, "Example3_i abstractness failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_basic_runme.php b/Examples/test-suite/php5/director_basic_runme.php
deleted file mode 100644
index de6b50502..000000000
--- a/Examples/test-suite/php5/director_basic_runme.php
+++ /dev/null
@@ -1,58 +0,0 @@
-ping(), "PhpFoo::ping()", "ping failed");
-
-check::equal($a->pong(), "Foo::pong();PhpFoo::ping()", "pong failed");
-
-$b = new Foo();
-
-check::equal($b->ping(), "Foo::ping()", "ping failed");
-
-check::equal($b->pong(), "Foo::pong();Foo::ping()", "pong failed");
-
-$a = new A1(1);
-
-check::equal($a->rg(2), 2, "rg failed");
-
-class PhpClass extends MyClass {
- function vmethod($b) {
- $b->x = $b->x + 31;
- return $b;
- }
-}
-
-$b = new Bar(3);
-$d = new MyClass();
-$c = new PhpClass();
-
-$cc = MyClass::get_self($c);
-$dd = MyClass::get_self($d);
-
-$bc = $cc->cmethod($b);
-$bd = $dd->cmethod($b);
-
-$cc->method($b);
-
-check::equal($bc->x, 34, "bc failed");
-check::equal($bd->x, 16, "bd failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_classic_runme.php b/Examples/test-suite/php5/director_classic_runme.php
deleted file mode 100644
index d2da1b1ba..000000000
--- a/Examples/test-suite/php5/director_classic_runme.php
+++ /dev/null
@@ -1,150 +0,0 @@
-id();
- if ($debug)
- print $ret . "\n";
- check::equal($ret, $expected, "#1 failed");
-
- # Polymorphic call from C++
- $caller = new Caller();
- $caller->setCallback($person);
- $ret = $caller->call();
- if ($debug)
- print $ret . "\n";
- check::equal($ret, $expected, "#2 failed");
-
- # Polymorphic call of object created in target language and passed to
- # C++ and back again
- $baseclass = $caller->baseClass();
- $ret = $baseclass->id();
- if ($debug)
- print $ret . "\n";
- # TODO: Currently we do not track the dynamic type of returned
- # objects, so in case it's possible that the dynamic type is not equal
- # to the static type, we skip this check.
- if (get_parent_class($person) === false)
- check::equal($ret, $expected, "#3 failed");
-
- $caller->resetCallback();
- if ($debug)
- print "----------------------------------------\n";
-}
-
-$person = new Person();
-mycheck($person, "Person");
-unset($person);
-
-$person = new Child();
-mycheck($person, "Child");
-unset($person);
-
-$person = new GrandChild();
-mycheck($person, "GrandChild");
-unset($person);
-
-$person = new TargetLangPerson();
-mycheck($person, "TargetLangPerson");
-unset($person);
-
-$person = new TargetLangChild();
-mycheck($person, "TargetLangChild");
-unset($person);
-
-$person = new TargetLangGrandChild();
-mycheck($person, "TargetLangGrandChild");
-unset($person);
-
-# Semis - don't override id() in target language
-$person = new TargetLangSemiPerson();
-mycheck($person, "Person");
-unset($person);
-
-$person = new TargetLangSemiChild();
-mycheck($person, "Child");
-unset($person);
-
-$person = new TargetLangSemiGrandChild();
-mycheck($person, "GrandChild");
-unset($person);
-
-# Orphans - don't override id() in C++
-$person = new OrphanPerson();
-mycheck($person, "Person");
-unset($person);
-
-$person = new OrphanChild();
-mycheck($person, "Child");
-unset($person);
-
-$person = new TargetLangOrphanPerson();
-mycheck($person, "TargetLangOrphanPerson");
-unset($person);
-
-$person = new TargetLangOrphanChild();
-mycheck($person, "TargetLangOrphanChild");
-unset($person);
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_default_runme.php b/Examples/test-suite/php5/director_default_runme.php
deleted file mode 100644
index f97fc7425..000000000
--- a/Examples/test-suite/php5/director_default_runme.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/Examples/test-suite/php5/director_detect_runme.php b/Examples/test-suite/php5/director_detect_runme.php
deleted file mode 100644
index cc19c0302..000000000
--- a/Examples/test-suite/php5/director_detect_runme.php
+++ /dev/null
@@ -1,55 +0,0 @@
-val = $val;
- }
-
- function get_value() {
- $this->val = $this->val + 1;
- return $this->val;
- }
-
- function get_class() {
- $this->val = $this->val + 1;
- return new A();
- }
-
- function just_do_it() {
- $this->val = $this->val + 1;
- }
-
- /* clone is a reserved keyword */
- function clone_() {
- return new MyBar($this->val);
- }
-}
-
-$b = new MyBar();
-
-$f = $b->baseclass();
-
-$v = $f->get_value();
-$a = $f->get_class();
-$f->just_do_it();
-
-$c = $b->clone_();
-$vc = $c->get_value();
-
-check::equal($v, 3, "f: Bad virtual detection");
-check::equal($b->val, 5, "b: Bad virtual detection");
-check::equal($vc, 6, "c: Bad virtual detection");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_enum_runme.php b/Examples/test-suite/php5/director_enum_runme.php
deleted file mode 100644
index 8f6487a28..000000000
--- a/Examples/test-suite/php5/director_enum_runme.php
+++ /dev/null
@@ -1,25 +0,0 @@
-say_hi(director_enum::hello), $b->say_hello(director_enum::hi), "say failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_exception_runme.php b/Examples/test-suite/php5/director_exception_runme.php
deleted file mode 100644
index 47f645b07..000000000
--- a/Examples/test-suite/php5/director_exception_runme.php
+++ /dev/null
@@ -1,127 +0,0 @@
-msg = $a . $b;
- }
-}
-
-class MyFoo extends Foo {
- function ping() {
- throw new Exception("MyFoo::ping() EXCEPTION");
- }
-}
-
-class MyFoo2 extends Foo {
- function ping() {
- return true;
- }
-}
-
-class MyFoo3 extends Foo {
- function ping() {
- throw new MyException("foo", "bar");
- }
-}
-
-# Check that the Exception raised by MyFoo.ping() is returned by
-# MyFoo.pong().
-$ok = 0;
-$a = new MyFoo();
-# TODO: Currently we do not track the dynamic type of returned
-# objects, so we skip the launder() call.
-#$b = director_exception::launder($a);
-$b = $a;
-try {
- $b->pong();
-} catch (Exception $e) {
- $ok = 1;
- check::equal($e->getMessage(), "MyFoo::ping() EXCEPTION", "Unexpected error message #1");
-}
-check::equal($ok, 1, "Got no exception while expected one #1");
-
-# Check that the director can return an exception which requires two
-# arguments to the constructor, without mangling it.
-$ok = 0;
-$a = new MyFoo3();
-#$b = director_exception::launder($a);
-$b = $a;
-try {
- $b->pong();
-} catch (Exception $e) {
- $ok = 1;
- check::equal($e->msg, "foobar", "Unexpected error message #2");
-}
-check::equal($ok, 1, "Got no exception while expected one #2");
-
-try {
- throw new Exception2();
-} catch (Exception2 $e2) {
-}
-
-try {
- throw new Exception1();
-} catch (Exception1 $e1) {
-}
-
-// Check that we can throw exceptions from director methods (this didn't used
-// to work in all cases, as the exception gets "set" in PHP and the method
-// then returns PHP NULL, which the directorout template may fail to convert.
-
-class Bad extends ReturnAllTypes {
- function return_int() { throw new Exception("bad int"); }
- function return_double() { throw new Exception("bad double"); }
- function return_const_char_star() { throw new Exception("bad const_char_star"); }
- function return_std_string() { throw new Exception("bad std_string"); }
- function return_Bar() { throw new Exception("bad Bar"); }
-}
-
-$bad = new Bad();
-
-try {
- $bad->call_int();
- check::fail("Exception wasn't propagated from Bad::return_int()");
-} catch (Exception $e) {
- check::equal($e->getMessage(), "bad int", "propagated exception incorrect");
-}
-
-try {
- $bad->call_double();
- check::fail("Exception wasn't propagated from Bad::return_double()");
-} catch (Exception $e) {
- check::equal($e->getMessage(), "bad double", "propagated exception incorrect");
-}
-
-try {
- $bad->call_const_char_star();
- check::fail("Exception wasn't propagated from Bad::return_const_char_star()");
-} catch (Exception $e) {
- check::equal($e->getMessage(), "bad const_char_star", "propagated exception incorrect");
-}
-
-try {
- $bad->call_std_string();
- check::fail("Exception wasn't propagated from Bad::return_std_string()");
-} catch (Exception $e) {
- check::equal($e->getMessage(), "bad std_string", "propagated exception incorrect");
-}
-
-try {
- $bad->call_Bar();
- check::fail("Exception wasn't propagated from Bad::return_Bar()");
-} catch (Exception $e) {
- check::equal($e->getMessage(), "bad Bar", "propagated exception incorrect");
-}
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_extend_runme.php b/Examples/test-suite/php5/director_extend_runme.php
deleted file mode 100644
index f283aefbe..000000000
--- a/Examples/test-suite/php5/director_extend_runme.php
+++ /dev/null
@@ -1,24 +0,0 @@
-dummy(), 666, "1st call");
-check::equal($m->dummy(), 666, "2st call"); // Locked system
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_finalizer_runme.php b/Examples/test-suite/php5/director_finalizer_runme.php
deleted file mode 100644
index 0fcddfd8b..000000000
--- a/Examples/test-suite/php5/director_finalizer_runme.php
+++ /dev/null
@@ -1,61 +0,0 @@
-orStatus(2);
- if (method_exists(parent, "__destruct")) {
- parent::__destruct();
- }
- }
-}
-
-resetStatus();
-
-$a = new MyFoo();
-unset($a);
-
-check::equal(getStatus(), 3, "getStatus() failed #1");
-
-resetStatus();
-
-$a = new MyFoo();
-launder($a);
-
-check::equal(getStatus(), 0, "getStatus() failed #2");
-
-unset($a);
-
-check::equal(getStatus(), 3, "getStatus() failed #3");
-
-resetStatus();
-
-$a = new MyFoo();
-$a->thisown = 0;
-deleteFoo($a);
-unset($a);
-
-check::equal(getStatus(), 3, "getStatus() failed #4");
-
-resetStatus();
-
-$a = new MyFoo();
-$a->thisown = 0;
-deleteFoo(launder($a));
-unset($a);
-
-check::equal(getStatus(), 3, "getStatus() failed #5");
-
-resetStatus();
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_frob_runme.php b/Examples/test-suite/php5/director_frob_runme.php
deleted file mode 100644
index 548b0b804..000000000
--- a/Examples/test-suite/php5/director_frob_runme.php
+++ /dev/null
@@ -1,19 +0,0 @@
-abs_method();
-
-check::equal($s, "Bravo::abs_method()", "s failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_nested_runme.php b/Examples/test-suite/php5/director_nested_runme.php
deleted file mode 100644
index 4965e94f7..000000000
--- a/Examples/test-suite/php5/director_nested_runme.php
+++ /dev/null
@@ -1,74 +0,0 @@
-step(), "Bar::step;Foo::advance;Bar::do_advance;A::do_step;", "Bad A virtual resolution");
-
-class B extends FooBar_int {
- function do_advance() {
- return "B::do_advance;" . $this->do_step();
- }
-
- function do_step() {
- return "B::do_step;";
- }
-
- function get_value() {
- return 1;
- }
-}
-
-$b = new B();
-
-check::equal($b->step(), "Bar::step;Foo::advance;B::do_advance;B::do_step;", "Bad B virtual resolution");
-
-class C extends FooBar_int {
- function do_advance() {
- return "C::do_advance;" . parent::do_advance();
- }
-
- function do_step() {
- return "C::do_step;";
- }
-
- function get_value() {
- return 2;
- }
-
- function get_name() {
- return parent::get_name() . " hello";
- }
-}
-
-$cc = new C();
-# TODO: Currently we do not track the dynamic type of returned
-# objects, so we skip the get_self() call.
-#$c = Foobar_int::get_self($cc);
-$c = $cc;
-$c->advance();
-
-check::equal($c->get_name(), "FooBar::get_name hello", "get_name failed");
-
-check::equal($c->name(), "FooBar::get_name hello", "name failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_pass_by_value_runme.php b/Examples/test-suite/php5/director_pass_by_value_runme.php
deleted file mode 100644
index 8a8b84d67..000000000
--- a/Examples/test-suite/php5/director_pass_by_value_runme.php
+++ /dev/null
@@ -1,24 +0,0 @@
-call_virtualMethod(new director_pass_by_value_Derived());
-$ret = $passByVal->getVal();
-if ($ret != 0x12345678) {
- check::fail("Bad return value, got " . dechex($ret));
-}
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_profile_runme.php b/Examples/test-suite/php5/director_profile_runme.php
deleted file mode 100644
index c72421341..000000000
--- a/Examples/test-suite/php5/director_profile_runme.php
+++ /dev/null
@@ -1,53 +0,0 @@
-fi($a); #1
- $a = $b->fi($a); #2
- $a = $b->fi($a); #3
- $a = $b->fi($a); #4
- $a = $b->fi($a); #5
- $a = $b->fi($a); #6
- $a = $b->fi($a); #7
- $a = $b->fi($a); #8
- $a = $b->fi($a); #9
- $a = $b->fi($a); #10
- $a = $b->fi($a); #1
- $a = $b->fi($a); #2
- $a = $b->fi($a); #3
- $a = $b->fi($a); #4
- $a = $b->fi($a); #5
- $a = $b->fi($a); #6
- $a = $b->fi($a); #7
- $a = $b->fi($a); #8
- $a = $b->fi($a); #9
- $a = $b->fi($a); #20
- $i -= 1;
-}
-
-print $a . "\n";
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_protected_runme.php b/Examples/test-suite/php5/director_protected_runme.php
deleted file mode 100644
index 18586ca62..000000000
--- a/Examples/test-suite/php5/director_protected_runme.php
+++ /dev/null
@@ -1,70 +0,0 @@
-create();
-$fb = new FooBar();
-$fb2 = new FooBar2();
-$fb3 = new FooBar3();
-
-check::equal($fb->used(), "Foo::pang();Bar::pong();Foo::pong();FooBar::ping();", "bad FooBar::used");
-
-check::equal($fb2->used(), "FooBar2::pang();Bar::pong();Foo::pong();FooBar2::ping();", "bad FooBar2::used");
-
-check::equal($b->pong(), "Bar::pong();Foo::pong();Bar::ping();", "bad Bar::pong");
-
-check::equal($f->pong(), "Bar::pong();Foo::pong();Bar::ping();", "bad Foo::pong");
-
-check::equal($fb->pong(), "Bar::pong();Foo::pong();FooBar::ping();", "bad FooBar::pong");
-
-$method = new ReflectionMethod('Bar', 'ping');
-check::equal($method->isProtected(), true, "Foo::ping should be protected");
-
-$method = new ReflectionMethod('Foo', 'ping');
-check::equal($method->isProtected(), true, "Foo::ping should be protected");
-
-$method = new ReflectionMethod('FooBar', 'pang');
-check::equal($method->isProtected(), true, "FooBar::pang should be protected");
-
-$method = new ReflectionMethod('Bar', 'cheer');
-check::equal($method->isProtected(), true, "Bar::cheer should be protected");
-
-$method = new ReflectionMethod('Foo', 'cheer');
-check::equal($method->isProtected(), true, "Foo::cheer should be protected");
-
-check::equal($fb3->cheer(), "FooBar3::cheer();", "bad fb3::pong");
-check::equal($fb2->callping(), "FooBar2::ping();", "bad fb2::callping");
-check::equal($fb2->callcheer(), "FooBar2::pang();Bar::pong();Foo::pong();FooBar2::ping();", "bad fb2::callcheer");
-check::equal($fb3->callping(), "Bar::ping();", "bad fb3::callping");
-check::equal($fb3->callcheer(), "FooBar3::cheer();", "bad fb3::callcheer");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_stl_runme.php b/Examples/test-suite/php5/director_stl_runme.php
deleted file mode 100644
index 29addd261..000000000
--- a/Examples/test-suite/php5/director_stl_runme.php
+++ /dev/null
@@ -1,60 +0,0 @@
-tping("hello");
-$a->tpong("hello");
-
-# TODO: automatic conversion between PHP arrays and std::pair or
-# std::vector is not yet implemented.
-/*$p = array(1, 2);
-$a->pident($p);
-$v = array(3, 4);
-$a->vident($v);
-
-$a->tpident($p);
-$a->tvident($v);
-
-$v1 = array(3, 4);
-$v2 = array(5, 6);
-
-$a->tvsecond($v1, $v2);
-
-$vs = array("hi", "hello");
-$vs;
-$a->tvidents($vs);*/
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_string_runme.php b/Examples/test-suite/php5/director_string_runme.php
deleted file mode 100644
index 5ac583f78..000000000
--- a/Examples/test-suite/php5/director_string_runme.php
+++ /dev/null
@@ -1,34 +0,0 @@
-smem = "hello";
- }
-}
-
-$b = new B("hello");
-
-$b->get(0);
-check::equal($b->get_first(),"hello world!", "get_first failed");
-
-$b->call_process_func();
-
-check::equal($b->smem, "hello", "smem failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_thread_runme.php b/Examples/test-suite/php5/director_thread_runme.php
deleted file mode 100644
index 809dec3e2..000000000
--- a/Examples/test-suite/php5/director_thread_runme.php
+++ /dev/null
@@ -1,32 +0,0 @@
-val = $this->val - 1;
- }
-}
-
-$d = new Derived();
-$d->run();
-
-if ($d->val >= 0) {
- check::fail($d->val);
-}
-
-$d->stop();
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/director_unroll_runme.php b/Examples/test-suite/php5/director_unroll_runme.php
deleted file mode 100644
index 626b1f07d..000000000
--- a/Examples/test-suite/php5/director_unroll_runme.php
+++ /dev/null
@@ -1,29 +0,0 @@
-set($a);
-$c = $b->get();
-
-check::equal($a->this, $c->this, "this failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/enum_scope_template_runme.php b/Examples/test-suite/php5/enum_scope_template_runme.php
deleted file mode 100644
index 85ba467b7..000000000
--- a/Examples/test-suite/php5/enum_scope_template_runme.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/Examples/test-suite/php5/evil_diamond_ns_runme.php b/Examples/test-suite/php5/evil_diamond_ns_runme.php
deleted file mode 100644
index fcce0f767..000000000
--- a/Examples/test-suite/php5/evil_diamond_ns_runme.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
diff --git a/Examples/test-suite/php5/evil_diamond_prop_runme.php b/Examples/test-suite/php5/evil_diamond_prop_runme.php
deleted file mode 100644
index 02d9944d6..000000000
--- a/Examples/test-suite/php5/evil_diamond_prop_runme.php
+++ /dev/null
@@ -1,38 +0,0 @@
-_foo,"1==foo->_foo");
-
-$bar=new bar();
-check::is_a($bar,"bar");
-check::equal(1,$bar->_foo,"1==bar->_foo");
-check::equal(2,$bar->_bar,"2==bar->_bar");
-
-$baz=new baz();
-check::is_a($baz,"baz");
-check::equal(1,$baz->_foo,"1==baz->_foo");
-check::equal(3,$baz->_baz,"3==baz->_baz");
-
-$spam=new spam();
-check::is_a($spam,"spam");
-check::equal(1,$spam->_foo,"1==spam->_foo");
-check::equal(2,$spam->_bar,"2==spam->_bar");
-// multiple inheritance not supported in PHP
-check::equal(null,$spam->_baz,"null==spam->_baz");
-check::equal(4,$spam->_spam,"4==spam->_spam");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/evil_diamond_runme.php b/Examples/test-suite/php5/evil_diamond_runme.php
deleted file mode 100644
index a587ca359..000000000
--- a/Examples/test-suite/php5/evil_diamond_runme.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/Examples/test-suite/php5/exception_order_runme.php b/Examples/test-suite/php5/exception_order_runme.php
deleted file mode 100644
index acb83561a..000000000
--- a/Examples/test-suite/php5/exception_order_runme.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
-require "tests.php";
-require "exception_order.php";
-
-check::functions(array(a_foo,a_bar,a_foobar,a_barfoo,is_python_builtin));
-check::classes(array(A,E1,E2,E3,exception_order,ET_i,ET_d));
-check::globals(array(efoovar,foovar,cfoovar,a_sfoovar,a_foovar,a_efoovar));
-
-$a = new A();
-try {
- $a->foo();
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'C++ E1 exception thrown', '');
-}
-
-try {
- $a->bar();
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'C++ E2 exception thrown', '');
-}
-
-try {
- $a->foobar();
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'postcatch unknown', '');
-}
-
-try {
- $a->barfoo(1);
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'C++ E1 exception thrown', '');
-}
-
-try {
- $a->barfoo(2);
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'C++ E2 * exception thrown', '');
-}
-?>
diff --git a/Examples/test-suite/php5/extend_template_ns_runme.php b/Examples/test-suite/php5/extend_template_ns_runme.php
deleted file mode 100644
index e6d3e9f73..000000000
--- a/Examples/test-suite/php5/extend_template_ns_runme.php
+++ /dev/null
@@ -1,12 +0,0 @@
-test1(2),"test1");
-check::equal(3,$foo->test2(3),"test2");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/extend_template_runme.php b/Examples/test-suite/php5/extend_template_runme.php
deleted file mode 100644
index 41bde4458..000000000
--- a/Examples/test-suite/php5/extend_template_runme.php
+++ /dev/null
@@ -1,12 +0,0 @@
-test1(2),"test1");
-check::equal(3,$foo->test2(3),"test2");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/grouping_runme.php b/Examples/test-suite/php5/grouping_runme.php
deleted file mode 100644
index 51446f473..000000000
--- a/Examples/test-suite/php5/grouping_runme.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
diff --git a/Examples/test-suite/php5/ignore_parameter_runme.php b/Examples/test-suite/php5/ignore_parameter_runme.php
deleted file mode 100644
index 1c8c76ad4..000000000
--- a/Examples/test-suite/php5/ignore_parameter_runme.php
+++ /dev/null
@@ -1,38 +0,0 @@
-daimler(2,3.4),"hello",'$sc->daimler(2,3.4)=="hello"');
-check::equal($sc->astonmartin("eek",3.4),101,'$sc->mastonmartin("eek",3.4)==101');
-check::equal($sc->bugatti("eek",2),8.8,'$sc->bugatti("eek",2)==8.8');
-check::equal($sc->lamborghini(),101,'$sc->lamborghini(2)==101');
-
-$mc=new minicooper(2,3.4);
-check::classname("minicooper",$mc);
-
-$mm=new morrisminor("eek",3.4);
-check::classname("morrisminor",$mm);
-
-$fa=new fordanglia("eek",2);
-check::classname("fordanglia",$fa);
-
-$aa=new austinallegro();
-check::classname("austinallegro",$aa);
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/import_nomodule_runme.php b/Examples/test-suite/php5/import_nomodule_runme.php
deleted file mode 100644
index 41836ba0f..000000000
--- a/Examples/test-suite/php5/import_nomodule_runme.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/Examples/test-suite/php5/li_carrays_cpp_runme.php b/Examples/test-suite/php5/li_carrays_cpp_runme.php
deleted file mode 100644
index e0f9ffe92..000000000
--- a/Examples/test-suite/php5/li_carrays_cpp_runme.php
+++ /dev/null
@@ -1,22 +0,0 @@
-setitem(0, 7);
-$d->setitem(5, $d->getitem(0) + 3);
-check::equal($d->getitem(0) + $d->getitem(5), 17., "7+10==17");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/li_carrays_runme.php b/Examples/test-suite/php5/li_carrays_runme.php
deleted file mode 100644
index 40e82f9ea..000000000
--- a/Examples/test-suite/php5/li_carrays_runme.php
+++ /dev/null
@@ -1,22 +0,0 @@
-setitem(0, 7);
-$d->setitem(5, $d->getitem(0) + 3);
-check::equal($d->getitem(0) + $d->getitem(5), 17., "7+10==17");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/li_factory_runme.php b/Examples/test-suite/php5/li_factory_runme.php
deleted file mode 100644
index 6623e2a8c..000000000
--- a/Examples/test-suite/php5/li_factory_runme.php
+++ /dev/null
@@ -1,22 +0,0 @@
-radius();
-check::equal($r, 1.5, "r failed");
-
-$point = Geometry::create(Geometry::POINT);
-$w = $point->width();
-check::equal($w, 1.0, "w failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/li_std_string_runme.php b/Examples/test-suite/php5/li_std_string_runme.php
deleted file mode 100644
index ad62247e1..000000000
--- a/Examples/test-suite/php5/li_std_string_runme.php
+++ /dev/null
@@ -1,31 +0,0 @@
-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();
-?>
diff --git a/Examples/test-suite/php5/li_std_vector_member_var_runme.php b/Examples/test-suite/php5/li_std_vector_member_var_runme.php
deleted file mode 100644
index 238350352..000000000
--- a/Examples/test-suite/php5/li_std_vector_member_var_runme.php
+++ /dev/null
@@ -1,30 +0,0 @@
-x, 0, "Test::x != 0");
-check::equal($t->v->size(), 0, "Test::v.size() != 0");
-
-$t->f(1);
-check::equal($t->x, 1, "Test::x != 1");
-check::equal($t->v->size(), 1, "Test::v.size() != 1");
-
-$t->f(2);
-check::equal($t->x, 3, "Test::x != 3");
-check::equal($t->v->size(), 2, "Test::v.size() != 2");
-
-$t->f(3);
-check::equal($t->x, 6, "Test::x != 6");
-check::equal($t->v->size(), 3, "Test::v.size() != 3");
-
-$T = new T();
-$T->start_t = new S();
-$T->length = 7;
-check::equal($T->start_t->x, 4, "S::x != 4");
-check::equal($T->length, 7, "T::length != 7");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/newobject1_runme.php b/Examples/test-suite/php5/newobject1_runme.php
deleted file mode 100644
index 5853a72c0..000000000
--- a/Examples/test-suite/php5/newobject1_runme.php
+++ /dev/null
@@ -1,19 +0,0 @@
-makeMore();
-check::equal(get_class($bar), "Foo", "regular failed");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/newobject3_runme.php b/Examples/test-suite/php5/newobject3_runme.php
deleted file mode 100644
index edd5d8608..000000000
--- a/Examples/test-suite/php5/newobject3_runme.php
+++ /dev/null
@@ -1,18 +0,0 @@
-create(7));
-check::classname("Product", $factory->create(7, 6));
-check::classname("Product", $factory->create("test"));
-check::classname("Product", $factory->create("test", 2));
-
-check::isnull($factory->create(0), "create(0) should be NULL");
-check::isnull($factory->create(7, -1), "create(7, -1) should be NULL");
-check::isnull($factory->create(0, -1), "create(0, -1) should be NULL");
-check::isnull($factory->create("bad", -1), "create(\"bad\", -1) should be NULL");
-
-?>
diff --git a/Examples/test-suite/php5/overload_rename_runme.php b/Examples/test-suite/php5/overload_rename_runme.php
deleted file mode 100644
index dce4c6cb3..000000000
--- a/Examples/test-suite/php5/overload_rename_runme.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
diff --git a/Examples/test-suite/php5/overload_return_type_runme.php b/Examples/test-suite/php5/overload_return_type_runme.php
deleted file mode 100644
index 4fa19d22a..000000000
--- a/Examples/test-suite/php5/overload_return_type_runme.php
+++ /dev/null
@@ -1,13 +0,0 @@
-foo(1), 0, "");
-check::classname("A", $b->foo("test"));
-
-check::equal(overload_return_type::foo(), 1, "overload_return_type::foo() should be 1");
-check::equal(overload_return_type::bar(), 1, "overload_return_type::bar() should be 1");
-
-?>
diff --git a/Examples/test-suite/php5/php_iterator_runme.php b/Examples/test-suite/php5/php_iterator_runme.php
deleted file mode 100644
index d69a5b385..000000000
--- a/Examples/test-suite/php5/php_iterator_runme.php
+++ /dev/null
@@ -1,24 +0,0 @@
- $v) {
- $s .= "($k=>$v)";
-}
-check::equal($s, '(0=>2)(1=>3)(2=>4)', 'Simple iteration failed');
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/php_pragma_runme.php b/Examples/test-suite/php5/php_pragma_runme.php
deleted file mode 100644
index c76cfc9b5..000000000
--- a/Examples/test-suite/php5/php_pragma_runme.php
+++ /dev/null
@@ -1,11 +0,0 @@
-getVersion(),"1.5==version(php_pragma)");
-
-check::done();
-
-?>
diff --git a/Examples/test-suite/php5/pointer_reference_runme.php b/Examples/test-suite/php5/pointer_reference_runme.php
deleted file mode 100644
index 52946177e..000000000
--- a/Examples/test-suite/php5/pointer_reference_runme.php
+++ /dev/null
@@ -1,18 +0,0 @@
-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();
-?>
diff --git a/Examples/test-suite/php5/prefix_runme.php b/Examples/test-suite/php5/prefix_runme.php
deleted file mode 100644
index ead064f5b..000000000
--- a/Examples/test-suite/php5/prefix_runme.php
+++ /dev/null
@@ -1,18 +0,0 @@
-get_self();
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/preproc_constants_c_runme.php b/Examples/test-suite/php5/preproc_constants_c_runme.php
deleted file mode 100644
index d55d4233d..000000000
--- a/Examples/test-suite/php5/preproc_constants_c_runme.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
diff --git a/Examples/test-suite/php5/preproc_constants_runme.php b/Examples/test-suite/php5/preproc_constants_runme.php
deleted file mode 100644
index 01137b06b..000000000
--- a/Examples/test-suite/php5/preproc_constants_runme.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
diff --git a/Examples/test-suite/php5/primitive_ref_runme.php b/Examples/test-suite/php5/primitive_ref_runme.php
deleted file mode 100644
index 263a28074..000000000
--- a/Examples/test-suite/php5/primitive_ref_runme.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
diff --git a/Examples/test-suite/php5/rename_scope_runme.php b/Examples/test-suite/php5/rename_scope_runme.php
deleted file mode 100644
index df620d796..000000000
--- a/Examples/test-suite/php5/rename_scope_runme.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/Examples/test-suite/php5/skel.php b/Examples/test-suite/php5/skel.php
deleted file mode 100644
index 780a999ed..000000000
--- a/Examples/test-suite/php5/skel.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/Examples/test-suite/php5/smart_pointer_rename_runme.php b/Examples/test-suite/php5/smart_pointer_rename_runme.php
deleted file mode 100644
index 26692dde5..000000000
--- a/Examples/test-suite/php5/smart_pointer_rename_runme.php
+++ /dev/null
@@ -1,27 +0,0 @@
-ftest1(1),"foo->ftest1");
-check::equal(2,$foo->ftest2(1,2),"foo->ftest2");
-
-# check bar's ftest1, ftest2, ftest
-check::equal(1,$bar->ftest1(1),"bar->ftest1");
-check::equal(2,$bar->ftest2(1,2),"bar->ftest2");
-check::equal(3,$bar->test(),"bar->test");
-
-# check deref returns foo
-check::classname("foo",$bar->__deref__());
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/swig_exception_runme.php b/Examples/test-suite/php5/swig_exception_runme.php
deleted file mode 100644
index 76641996e..000000000
--- a/Examples/test-suite/php5/swig_exception_runme.php
+++ /dev/null
@@ -1,33 +0,0 @@
-throwException();
- check::fail("Exception wasn't thrown");
-} catch (Exception $e) {
- if ($e->getMessage() != "OK") {
- check::fail("Exception getMessage() should be \"OK\", actually \"".$e->getMessage()."\"");
- }
-}
-
-# ----- Delete everything -----
-
-$c = NULL;
-$s = NULL;
-$e = NULL;
-
-if (Shape::nshapes() != 0) {
- check::fail("Shape::nshapes() should be 0, actually ".Shape::nshapes());
-}
-
-?>
diff --git a/Examples/test-suite/php5/sym_runme.php b/Examples/test-suite/php5/sym_runme.php
deleted file mode 100644
index 483aaa980..000000000
--- a/Examples/test-suite/php5/sym_runme.php
+++ /dev/null
@@ -1,22 +0,0 @@
-hulahoops(),"flim-jam","flim()->hulahoops==flim-jam");
-check::equal($flim->jar(),"flim-jar","flim()->jar==flim-jar");
-check::equal($flam->jam(),"flam-jam","flam()->jam==flam-jam");
-check::equal($flam->jar(),"flam-jar","flam()->jar==flam-jar");
-
-check::done();
-?>
diff --git a/Examples/test-suite/php5/template_arg_typename_runme.php b/Examples/test-suite/php5/template_arg_typename_runme.php
deleted file mode 100644
index 7d60285e3..000000000
--- a/Examples/test-suite/php5/template_arg_typename_runme.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
diff --git a/Examples/test-suite/php5/template_construct_runme.php b/Examples/test-suite/php5/template_construct_runme.php
deleted file mode 100644
index 3a3986f7e..000000000
--- a/Examples/test-suite/php5/template_construct_runme.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/Examples/test-suite/php5/tests.php b/Examples/test-suite/php5/tests.php
deleted file mode 100644
index 92939c71c..000000000
--- a/Examples/test-suite/php5/tests.php
+++ /dev/null
@@ -1,237 +0,0 @@
-
diff --git a/Examples/test-suite/php5/threads_exception_runme.php b/Examples/test-suite/php5/threads_exception_runme.php
deleted file mode 100644
index 78c6bf592..000000000
--- a/Examples/test-suite/php5/threads_exception_runme.php
+++ /dev/null
@@ -1,43 +0,0 @@
-unknown();
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'C++ A * exception thrown', '');
-}
-
-try {
- $t->simple();
-} catch (Exception $e) {
- check::equal($e->getCode(), 37, '');
-}
-
-try {
- $t->message();
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'I died.', '');
-}
-
-try {
- $t->hosed();
-} catch (Exception $e) {
- check::equal($e->getMessage(), 'C++ Exc exception thrown', '');
-}
-
-foreach (Array(1,2,3,4) as $i) {
- try {
- $t->multi($i);
- } catch (Exception $e) {
- }
-}
diff --git a/Examples/test-suite/php5/typedef_reference_runme.php b/Examples/test-suite/php5/typedef_reference_runme.php
deleted file mode 100644
index 88a70f8d3..000000000
--- a/Examples/test-suite/php5/typedef_reference_runme.php
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/Examples/test-suite/php5/typemap_ns_using_runme.php b/Examples/test-suite/php5/typemap_ns_using_runme.php
deleted file mode 100644
index 6a599f008..000000000
--- a/Examples/test-suite/php5/typemap_ns_using_runme.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/Examples/test-suite/php5/using1_runme.php b/Examples/test-suite/php5/using1_runme.php
deleted file mode 100644
index 51841bc78..000000000
--- a/Examples/test-suite/php5/using1_runme.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/Examples/test-suite/php5/using2_runme.php b/Examples/test-suite/php5/using2_runme.php
deleted file mode 100644
index 391a98f52..000000000
--- a/Examples/test-suite/php5/using2_runme.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/Examples/test-suite/php5/valuewrapper_base_runme.php b/Examples/test-suite/php5/valuewrapper_base_runme.php
deleted file mode 100644
index 6a1abdbd2..000000000
--- a/Examples/test-suite/php5/valuewrapper_base_runme.php
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/Examples/test-suite/php5/virtual_vs_nonvirtual_base_runme.php b/Examples/test-suite/php5/virtual_vs_nonvirtual_base_runme.php
deleted file mode 100644
index 0d4aa3d5f..000000000
--- a/Examples/test-suite/php5/virtual_vs_nonvirtual_base_runme.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-require "tests.php";
-require "virtual_vs_nonvirtual_base.php";
-
-$fail = new SimpleClassFail();
-$work = new SimpleClassWork();
-
-check::equal($work->getInner()->get(), $fail->getInner()->get(), "should both be 10");
-
-?>
diff --git a/Examples/test-suite/php5/wrapmacro_runme.php b/Examples/test-suite/php5/wrapmacro_runme.php
deleted file mode 100644
index f32da990e..000000000
--- a/Examples/test-suite/php5/wrapmacro_runme.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/Examples/test-suite/restrict_cplusplus.i b/Examples/test-suite/restrict_cplusplus.i
index 62abffa52..53c5782a1 100644
--- a/Examples/test-suite/restrict_cplusplus.i
+++ b/Examples/test-suite/restrict_cplusplus.i
@@ -1,7 +1,8 @@
%module restrict_cplusplus
%{
-// For PHP 5.3 / gcc-4.4
+// Workaround PHP's headers which do:
+// #define restrict __restrict__
#ifdef restrict
#undef restrict
#endif
diff --git a/Lib/allkw.swg b/Lib/allkw.swg
index b9413191f..563190e19 100644
--- a/Lib/allkw.swg
+++ b/Lib/allkw.swg
@@ -24,7 +24,6 @@
%include
%include
%include
-%include
%include
%include
%include
diff --git a/Lib/cdata.i b/Lib/cdata.i
index 3ac693cfc..23b7211e7 100644
--- a/Lib/cdata.i
+++ b/Lib/cdata.i
@@ -29,13 +29,6 @@ typedef struct SWIGCDATA {
}
%typemap(in) (const void *indata, int inlen) = (char *STRING, int LENGTH);
-#elif SWIGPHP5
-
-%typemap(out) SWIGCDATA {
- ZVAL_STRINGL($result, $1.data, $1.len, 1);
-}
-%typemap(in) (const void *indata, int inlen) = (char *STRING, int LENGTH);
-
#elif SWIGPHP7
%typemap(out) SWIGCDATA {
diff --git a/Lib/exception.i b/Lib/exception.i
index da0d56cdd..3e7c7fd8e 100644
--- a/Lib/exception.i
+++ b/Lib/exception.i
@@ -12,13 +12,6 @@
%insert("runtime") "swigerrors.swg"
-#ifdef SWIGPHP5
-%{
-#include "zend_exceptions.h"
-#define SWIG_exception(code, msg) do { zend_throw_exception(NULL, (char*)msg, code TSRMLS_CC); goto thrown; } while (0)
-%}
-#endif
-
#ifdef SWIGPHP7
%{
#include "zend_exceptions.h"
diff --git a/Lib/php/phpkw.swg b/Lib/php/phpkw.swg
index db451f957..8e5d3412e 100644
--- a/Lib/php/phpkw.swg
+++ b/Lib/php/phpkw.swg
@@ -36,7 +36,7 @@ PHPKW(and);
PHPKW(array);
PHPKW(as);
PHPKW(break);
-PHPKW(callable); // As of PHP 5.4
+PHPKW(callable);
PHPKW(case);
PHPKW(catch);
PHPKW(class);
@@ -61,22 +61,22 @@ PHPKW(eval); // "Language construct"
PHPKW(exit); // "Language construct"
PHPKW(extends);
PHPKW(final);
-PHPKW(finally); // As of PHP 5.5
+PHPKW(finally);
PHPKW(for);
PHPKW(foreach);
PHPKW(function);
PHPKW(global);
-PHPKW(goto); // As of PHP 5.3
+PHPKW(goto);
PHPKW(if);
PHPKW(implements);
PHPKW(include); // "Language construct"
PHPKW(include_once); // "Language construct"
PHPKW(instanceof);
-PHPKW(insteadof); // As of PHP 5.4
+PHPKW(insteadof);
PHPKW(interface);
PHPKW(isset); // "Language construct"
PHPKW(list); // "Language construct"
-PHPKW(namespace); // As of PHP 5.3
+PHPKW(namespace);
PHPKW(new);
PHPKW(or);
PHPKW(print); // "Language construct"
@@ -89,27 +89,27 @@ PHPKW(return); // "Language construct"
PHPKW(static);
PHPKW(switch);
PHPKW(throw);
-PHPKW(trait); // As of PHP 5.4
+PHPKW(trait);
PHPKW(try);
PHPKW(unset); // "Language construct"
PHPKW(use);
PHPKW(var);
PHPKW(while);
PHPKW(xor);
-PHPKW(yield); // As of PHP 5.5
+PHPKW(yield);
// Compile-time "magic" constants
// From: http://php.net/manual/en/reserved.keywords.php
// also at: http://php.net/manual/en/language.constants.predefined.php
/* These *MUST* be listed in lower case here */
PHPKW(__class__);
-PHPKW(__dir__); // As of PHP 5.3
+PHPKW(__dir__);
PHPKW(__file__);
PHPKW(__function__);
PHPKW(__line__);
PHPKW(__method__);
-PHPKW(__namespace__); // As of PHP 5.3
-PHPKW(__trait__); // As of PHP 5.4
+PHPKW(__namespace__);
+PHPKW(__trait__);
/* We classify these as built-in names since they conflict, but PHP still runs */
@@ -122,27 +122,27 @@ PHPBN1(false);
/* "Core Predefined Constants" from http://php.net/manual/en/reserved.constants.php */
/* These are case sensitive */
PHPBN2(PHP_VERSION);
-PHPBN2(PHP_MAJOR_VERSION); // As of PHP 5.2.7
-PHPBN2(PHP_MINOR_VERSION); // As of PHP 5.2.7
-PHPBN2(PHP_RELEASE_VERSION); // As of PHP 5.2.7
-PHPBN2(PHP_VERSION_ID); // As of PHP 5.2.7
-PHPBN2(PHP_EXTRA_VERSION); // As of PHP 5.2.7
-PHPBN2(PHP_ZTS); // As of PHP 5.2.7
-PHPBN2(PHP_DEBUG); // As of PHP 5.2.7
-PHPBN2(PHP_MAXPATHLEN); // As of PHP 5.3.0
+PHPBN2(PHP_MAJOR_VERSION);
+PHPBN2(PHP_MINOR_VERSION);
+PHPBN2(PHP_RELEASE_VERSION);
+PHPBN2(PHP_VERSION_ID);
+PHPBN2(PHP_EXTRA_VERSION);
+PHPBN2(PHP_ZTS);
+PHPBN2(PHP_DEBUG);
+PHPBN2(PHP_MAXPATHLEN);
PHPBN2(PHP_OS);
PHPBN2(PHP_SAPI);
-PHPBN2(PHP_EOL); // As of PHP 5.0.2
-PHPBN2(PHP_INT_MAX); // As of PHP 5.0.5
-PHPBN2(PHP_INT_SIZE); // As of PHP 5.0.5
+PHPBN2(PHP_EOL);
+PHPBN2(PHP_INT_MAX);
+PHPBN2(PHP_INT_SIZE);
PHPBN2(DEFAULT_INCLUDE_PATH);
PHPBN2(PEAR_INSTALL_DIR);
PHPBN2(PEAR_EXTENSION_DIR);
PHPBN2(PHP_EXTENSION_DIR);
PHPBN2(PHP_PREFIX);
PHPBN2(PHP_BINDIR);
-PHPBN2(PHP_BINARY); // As of PHP 5.4
-PHPBN2(PHP_MANDIR); // As of PHP 5.3.7
+PHPBN2(PHP_BINARY);
+PHPBN2(PHP_MANDIR);
PHPBN2(PHP_LIBDIR);
PHPBN2(PHP_DATADIR);
PHPBN2(PHP_SYSCONFDIR);
@@ -161,11 +161,11 @@ PHPBN2(E_COMPILE_WARNING);
PHPBN2(E_USER_ERROR);
PHPBN2(E_USER_WARNING);
PHPBN2(E_USER_NOTICE);
-PHPBN2(E_DEPRECATED); // As of PHP 5.3.0
-PHPBN2(E_USER_DEPRECATED); // As of PHP 5.3.0
+PHPBN2(E_DEPRECATED);
+PHPBN2(E_USER_DEPRECATED);
PHPBN2(E_ALL);
PHPBN2(E_STRICT);
-PHPBN2(__COMPILER_HALT_OFFSET__); // As of PHP 5.1.0
+PHPBN2(__COMPILER_HALT_OFFSET__);
// TRUE, FALSE, NULL are listed on the same page, but are actually
// case-insensitive, whereas all the other constants listed there seem to be
// case-sensitive, so we handle TRUE, FALSE, NULL in PHPBN1.
@@ -174,17 +174,17 @@ PHPBN2(PHP_OUTPUT_HANDLER_CONT);
PHPBN2(PHP_OUTPUT_HANDLER_END);
/* These don't actually seem to be set (tested on Linux, I guess they're
* Windows only?) */
-PHPBN2(PHP_WINDOWS_NT_DOMAIN_CONTROLLER); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_NT_SERVER); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_NT_WORKSTATION); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_BUILD); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_MAJOR); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_MINOR); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_PLATFORM); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_PRODUCTTYPE); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_SP_MAJOR); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_SP_MINOR); // As of PHP 5.3
-PHPBN2(PHP_WINDOWS_VERSION_SUITEMASK); // As of PHP 5.3
+PHPBN2(PHP_WINDOWS_NT_DOMAIN_CONTROLLER);
+PHPBN2(PHP_WINDOWS_NT_SERVER);
+PHPBN2(PHP_WINDOWS_NT_WORKSTATION);
+PHPBN2(PHP_WINDOWS_VERSION_BUILD);
+PHPBN2(PHP_WINDOWS_VERSION_MAJOR);
+PHPBN2(PHP_WINDOWS_VERSION_MINOR);
+PHPBN2(PHP_WINDOWS_VERSION_PLATFORM);
+PHPBN2(PHP_WINDOWS_VERSION_PRODUCTTYPE);
+PHPBN2(PHP_WINDOWS_VERSION_SP_MAJOR);
+PHPBN2(PHP_WINDOWS_VERSION_SP_MINOR);
+PHPBN2(PHP_WINDOWS_VERSION_SUITEMASK);
/* "Standard Predefined Constants" from http://php.net/manual/en/reserved.constants.php */
PHPBN2(EXTR_OVERWRITE);
PHPBN2(EXTR_SKIP);
@@ -214,8 +214,8 @@ PHPBN2(INI_USER);
PHPBN2(INI_PERDIR);
PHPBN2(INI_SYSTEM);
PHPBN2(INI_ALL);
-PHPBN2(INI_SCANNER_NORMAL); // As of PHP 5.3
-PHPBN2(INI_SCANNER_RAW); // As of PHP 5.3
+PHPBN2(INI_SCANNER_NORMAL);
+PHPBN2(INI_SCANNER_RAW);
PHPBN2(M_E);
PHPBN2(M_LOG2E);
PHPBN2(M_LOG10E);
@@ -229,10 +229,10 @@ PHPBN2(M_2_PI);
PHPBN2(M_2_SQRTPI);
PHPBN2(M_SQRT2);
PHPBN2(M_SQRT1_2);
-PHPBN2(M_EULER); // As of PHP 5.2
-PHPBN2(M_LNPI); // As of PHP 5.2
-PHPBN2(M_SQRT3); // As of PHP 5.2
-PHPBN2(M_SQRTPI); // As of PHP 5.2
+PHPBN2(M_EULER);
+PHPBN2(M_LNPI);
+PHPBN2(M_SQRT3);
+PHPBN2(M_SQRTPI);
PHPBN2(CRYPT_SALT_LENGTH);
PHPBN2(CRYPT_STD_DES);
PHPBN2(CRYPT_EXT_DES);
@@ -273,7 +273,7 @@ PHPBN2(STR_PAD_BOTH);
PHPBN2(PATHINFO_DIRNAME);
PHPBN2(PATHINFO_BASENAME);
PHPBN2(PATHINFO_EXTENSION);
-PHPBN2(PATHINFO_FILENAME); // As of PHP 5.2
+PHPBN2(PATHINFO_FILENAME);
PHPBN2(PATH_SEPARATOR);
PHPBN2(CHAR_MAX);
PHPBN2(LC_CTYPE);
@@ -393,7 +393,6 @@ PHPBN2(LOG_NDELAY);
PHPBN2(LOG_NOWAIT);
PHPBN2(LOG_PERROR);
-/* Added in PHP 5.2 */
PHPBN2(PREG_BACKTRACK_LIMIT_ERROR);
PHPBN2(PREG_BAD_UTF8_ERROR);
PHPBN2(PREG_INTERNAL_ERROR);
@@ -415,10 +414,10 @@ PHPBN2(CURLFTPSSL_NONE);
PHPBN2(CURLFTPSSL_TRY);
PHPBN2(CURLOPT_FTP_SSL);
PHPBN2(CURLOPT_FTPSSLAUTH);
-PHPBN2(CURLOPT_TCP_NODELAY); // Added in PHP 5.2.1
-PHPBN2(CURLOPT_TIMEOUT_MS); // Added in PHP 5.2.3
-PHPBN2(CURLOPT_CONNECTTIMEOUT_MS); // Added in PHP 5.2.3
-PHPBN2(GMP_VERSION); // Added in PHP 5.2.2
+PHPBN2(CURLOPT_TCP_NODELAY);
+PHPBN2(CURLOPT_TIMEOUT_MS);
+PHPBN2(CURLOPT_CONNECTTIMEOUT_MS);
+PHPBN2(GMP_VERSION);
PHPBN2(SWFTEXTFIELD_USEFONT);
PHPBN2(SWFTEXTFIELD_AUTOSIZE);
PHPBN2(SWF_SOUND_NOT_COMPRESSED);
@@ -440,7 +439,6 @@ PHPBN2(SNMP_OID_OUTPUT_NUMERIC);
PHPBN2(MSG_EAGAIN);
PHPBN2(MSG_ENOMSG);
-/* Added in PHP 5.3 */
PHPBN2(CURLOPT_PROGRESSFUNCTION);
PHPBN2(IMG_FILTER_PIXELATE);
PHPBN2(JSON_ERROR_CTRL_CHAR);
@@ -504,7 +502,6 @@ PHPBN2(SIG_UNBLOCK);
PHPBN2(TRAP_BRKPT);
PHPBN2(TRAP_TRACE);
-/* Added in PHP 5.4 */
PHPBN2(ENT_DISALLOWED);
PHPBN2(ENT_HTML401);
PHPBN2(ENT_HTML5);
@@ -583,7 +580,6 @@ PHPBN2(JSON_NUMERIC_CHECK);
PHPBN2(JSON_UNESCAPED_UNICODE);
PHPBN2(JSON_BIGINT_AS_STRING);
-/* Added in PHP 5.5 */
PHPBN2(IMG_AFFINE_TRANSLATE);
PHPBN2(IMG_AFFINE_SCALE);
PHPBN2(IMG_AFFINE_ROTATE);
@@ -622,7 +618,6 @@ PHPBN2(JSON_ERROR_INF_OR_NAN);
PHPBN2(JSON_ERROR_UNSUPPORTED_TYPE);
PHPBN2(MYSQLI_SERVER_PUBLIC_KEY);
-/* Added in PHP 5.6 */
PHPBN2(LDAP_ESCAPE_DN);
PHPBN2(LDAP_ESCAPE_FILTER);
PHPBN2(OPENSSL_DEFAULT_STREAM_CIPHERS);
@@ -654,10 +649,10 @@ PHPCN(stdclass);
PHPCN(__php_incomplete_class);
/* Added in PHP5. */
PHPCN(exception);
-PHPCN(errorexception); // As of PHP 5.1
+PHPCN(errorexception);
PHPCN(php_user_filter);
-PHPCN(closure); // As of PHP 5.3
-PHPCN(generator); // As of PHP 5.5
+PHPCN(closure);
+PHPCN(generator);
PHPCN(self);
PHPCN(static);
PHPCN(parent);
diff --git a/Lib/php/phprun.swg b/Lib/php/phprun.swg
index 5c62d1927..3aa75ca1c 100644
--- a/Lib/php/phprun.swg
+++ b/Lib/php/phprun.swg
@@ -13,7 +13,7 @@ extern "C" {
#include "php.h"
#if PHP_MAJOR_VERSION != 7
-# error These bindings need PHP7 - to generate PHP5 bindings use: swig -php5
+# error These bindings need PHP7 - to generate PHP5 bindings use: SWIG < 4.0.0 and swig -php5
#endif
#include "ext/standard/php_string.h"
diff --git a/Lib/php5/const.i b/Lib/php5/const.i
deleted file mode 100644
index 061ba99a2..000000000
--- a/Lib/php5/const.i
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -----------------------------------------------------------------------------
- * const.i
- *
- * Typemaps for constants
- * ----------------------------------------------------------------------------- */
-
-%typemap(consttab) int,
- unsigned int,
- short,
- unsigned short,
- long,
- unsigned long,
- unsigned char,
- signed char,
- bool,
- enum SWIGTYPE
- "SWIG_LONG_CONSTANT($symname, ($1_type)$value);";
-
-%typemap(consttab) float,
- double
- "SWIG_DOUBLE_CONSTANT($symname, $value);";
-
-%typemap(consttab) char
- "SWIG_CHAR_CONSTANT($symname, $value);";
-
-%typemap(consttab) char *,
- const char *,
- char [],
- const char []
- "SWIG_STRING_CONSTANT($symname, $value);";
-
-%typemap(consttab) SWIGTYPE *,
- SWIGTYPE &,
- SWIGTYPE &&,
- SWIGTYPE [] {
- zval *z_var;
- zend_constant c;
- size_t len = sizeof("$symname") - 1;
- MAKE_STD_ZVAL(z_var);
- SWIG_SetPointerZval(z_var, (void*)$value, $1_descriptor, 0);
- c.value = *z_var;
- zval_copy_ctor(&c.value);
- c.name = zend_strndup("$symname", len);
- c.name_len = len+1;
- c.flags = CONST_CS | CONST_PERSISTENT;
- c.module_number = module_number;
- zend_register_constant( &c TSRMLS_CC );
-}
-
-/* Handled as a global variable. */
-%typemap(consttab) SWIGTYPE (CLASS::*) "";
diff --git a/Lib/php5/director.swg b/Lib/php5/director.swg
deleted file mode 100644
index 638a1697d..000000000
--- a/Lib/php5/director.swg
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -----------------------------------------------------------------------------
- * director.swg
- *
- * This file contains support for director classes so that PHP proxy
- * methods can be called from C++.
- * ----------------------------------------------------------------------------- */
-
-#ifndef SWIG_DIRECTOR_PHP_HEADER_
-#define SWIG_DIRECTOR_PHP_HEADER_
-
-#include
-#include
-#include