From bcc796f676ef7e871cdc44a096d74f1da92e232d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 6 Dec 2008 21:40:54 +0000 Subject: modify build system to use php instead of php4 git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10967 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/Makefile.in | 34 +-- Examples/php/class/Makefile | 10 +- Examples/php/class/runme.php | 64 ++++++ Examples/php/class/runme.php4 | 64 ------ Examples/php/constants/Makefile | 10 +- Examples/php/constants/runme.php | 28 +++ Examples/php/constants/runme.php4 | 28 --- Examples/php/cpointer/Makefile | 10 +- Examples/php/cpointer/runme.php | 45 ++++ Examples/php/cpointer/runme.php4 | 45 ---- Examples/php/disown/Makefile | 10 +- Examples/php/disown/runme.php | 49 +++++ Examples/php/disown/runme.php4 | 49 ----- Examples/php/enum/Makefile | 10 +- Examples/php/enum/runme.php | 32 +++ Examples/php/enum/runme.php4 | 32 --- Examples/php/funcptr/Makefile | 10 +- Examples/php/funcptr/runme.php | 24 +++ Examples/php/funcptr/runme.php4 | 24 --- Examples/php/overloading/Makefile | 10 +- Examples/php/overloading/runme.php | 59 ++++++ Examples/php/overloading/runme.php4 | 59 ------ Examples/php/pointer/Makefile | 10 +- Examples/php/pointer/runme.php | 35 ++++ Examples/php/pointer/runme.php4 | 35 ---- Examples/php/pragmas/Makefile | 10 +- Examples/php/pragmas/runme.php | 5 + Examples/php/pragmas/runme.php4 | 5 - Examples/php/proxy/Makefile | 10 +- Examples/php/proxy/runme.php | 68 ++++++ Examples/php/proxy/runme.php4 | 68 ------ Examples/php/reference/Makefile | 10 +- Examples/php/reference/runme.php | 78 +++++++ Examples/php/reference/runme.php4 | 78 ------- Examples/php/simple/Makefile | 10 +- Examples/php/simple/runme.php | 25 +++ Examples/php/simple/runme.php4 | 25 --- Examples/php/sync/Makefile | 10 +- Examples/php/sync/runme.php | 15 ++ Examples/php/sync/runme.php4 | 15 -- Examples/php/value/Makefile | 10 +- Examples/php/value/runme.php | 43 ++++ Examples/php/value/runme.php4 | 43 ---- Examples/php/variables/Makefile | 10 +- Examples/php/variables/runme.php | 96 +++++++++ Examples/php/variables/runme.php4 | 96 --------- Examples/test-suite/php/Makefile.in | 22 +- .../test-suite/php/abstract_inherit_ok_runme.php | 12 ++ .../test-suite/php/abstract_inherit_ok_runme.php4 | 12 -- Examples/test-suite/php/abstract_inherit_runme.php | 14 ++ .../test-suite/php/abstract_inherit_runme.php4 | 14 -- Examples/test-suite/php/add_link_runme.php | 23 +++ Examples/test-suite/php/add_link_runme.php4 | 23 --- Examples/test-suite/php/argout_runme.php | 37 ++++ Examples/test-suite/php/argout_runme.php4 | 37 ---- Examples/test-suite/php/arrayptr_runme.php | 15 ++ Examples/test-suite/php/arrayptr_runme.php4 | 15 -- Examples/test-suite/php/arrays_global_runme.php | 14 ++ Examples/test-suite/php/arrays_global_runme.php4 | 14 -- .../test-suite/php/arrays_global_twodim_runme.php | 23 +++ .../test-suite/php/arrays_global_twodim_runme.php4 | 23 --- Examples/test-suite/php/arrays_runme.php | 19 ++ Examples/test-suite/php/arrays_runme.php4 | 19 -- Examples/test-suite/php/arrays_scope_runme.php | 17 ++ Examples/test-suite/php/arrays_scope_runme.php4 | 17 -- Examples/test-suite/php/casts_runme.php | 19 ++ Examples/test-suite/php/casts_runme.php4 | 19 -- Examples/test-suite/php/class_ignore_runme.php | 17 ++ Examples/test-suite/php/class_ignore_runme.php4 | 17 -- .../test-suite/php/conversion_namespace_runme.php | 14 ++ .../test-suite/php/conversion_namespace_runme.php4 | 14 -- .../php/conversion_ns_template_runme.php | 10 + .../php/conversion_ns_template_runme.php4 | 10 - Examples/test-suite/php/conversion_runme.php | 14 ++ Examples/test-suite/php/conversion_runme.php4 | 14 -- Examples/test-suite/php/cpp_static_runme.php | 15 ++ Examples/test-suite/php/cpp_static_runme.php4 | 15 -- .../test-suite/php/enum_scope_template_runme.php | 17 ++ .../test-suite/php/enum_scope_template_runme.php4 | 17 -- Examples/test-suite/php/evil_diamond_ns_runme.php | 19 ++ Examples/test-suite/php/evil_diamond_ns_runme.php4 | 19 -- .../test-suite/php/evil_diamond_prop_runme.php | 38 ++++ .../test-suite/php/evil_diamond_prop_runme.php4 | 38 ---- Examples/test-suite/php/evil_diamond_runme.php | 17 ++ Examples/test-suite/php/evil_diamond_runme.php4 | 17 -- .../test-suite/php/extend_template_ns_runme.php | 13 ++ .../test-suite/php/extend_template_ns_runme.php4 | 13 -- Examples/test-suite/php/extend_template_runme.php | 13 ++ Examples/test-suite/php/extend_template_runme.php4 | 13 -- Examples/test-suite/php/grouping_runme.php | 23 +++ Examples/test-suite/php/grouping_runme.php4 | 23 --- Examples/test-suite/php/ignore_parameter_runme.php | 39 ++++ .../test-suite/php/ignore_parameter_runme.php4 | 39 ---- Examples/test-suite/php/li_carrays_runme.php | 15 ++ Examples/test-suite/php/li_carrays_runme.php4 | 15 -- Examples/test-suite/php/li_std_string_runme.php | 32 +++ Examples/test-suite/php/li_std_string_runme.php4 | 32 --- Examples/test-suite/php/rename_scope_runme.php | 17 ++ Examples/test-suite/php/rename_scope_runme.php4 | 17 -- Examples/test-suite/php/skel.php | 15 ++ Examples/test-suite/php/skel.php4 | 15 -- .../test-suite/php/smart_pointer_rename_runme.php | 28 +++ .../test-suite/php/smart_pointer_rename_runme.php4 | 28 --- Examples/test-suite/php/sym_runme.php | 23 +++ Examples/test-suite/php/sym_runme.php4 | 23 --- .../test-suite/php/template_arg_typename_runme.php | 19 ++ .../php/template_arg_typename_runme.php4 | 19 -- .../test-suite/php/template_construct_runme.php | 11 + .../test-suite/php/template_construct_runme.php4 | 11 - Examples/test-suite/php/tests.php | 227 +++++++++++++++++++++ Examples/test-suite/php/tests.php4 | 227 --------------------- .../test-suite/php/typedef_reference_runme.php | 13 ++ .../test-suite/php/typedef_reference_runme.php4 | 13 -- Examples/test-suite/php/typemap_ns_using_runme.php | 9 + .../test-suite/php/typemap_ns_using_runme.php4 | 9 - Examples/test-suite/php/using1_runme.php | 9 + Examples/test-suite/php/using1_runme.php4 | 9 - Examples/test-suite/php/using2_runme.php | 9 + Examples/test-suite/php/using2_runme.php4 | 9 - .../test-suite/php/valuewrapper_base_runme.php | 14 ++ .../test-suite/php/valuewrapper_base_runme.php4 | 14 -- Makefile.in | 2 +- configure.in | 46 ++--- 123 files changed, 1676 insertions(+), 1676 deletions(-) create mode 100644 Examples/php/class/runme.php delete mode 100644 Examples/php/class/runme.php4 create mode 100644 Examples/php/constants/runme.php delete mode 100644 Examples/php/constants/runme.php4 create mode 100644 Examples/php/cpointer/runme.php delete mode 100644 Examples/php/cpointer/runme.php4 create mode 100644 Examples/php/disown/runme.php delete mode 100644 Examples/php/disown/runme.php4 create mode 100644 Examples/php/enum/runme.php delete mode 100644 Examples/php/enum/runme.php4 create mode 100644 Examples/php/funcptr/runme.php delete mode 100644 Examples/php/funcptr/runme.php4 create mode 100644 Examples/php/overloading/runme.php delete mode 100644 Examples/php/overloading/runme.php4 create mode 100644 Examples/php/pointer/runme.php delete mode 100644 Examples/php/pointer/runme.php4 create mode 100755 Examples/php/pragmas/runme.php delete mode 100755 Examples/php/pragmas/runme.php4 create mode 100644 Examples/php/proxy/runme.php delete mode 100644 Examples/php/proxy/runme.php4 create mode 100644 Examples/php/reference/runme.php delete mode 100644 Examples/php/reference/runme.php4 create mode 100755 Examples/php/simple/runme.php delete mode 100755 Examples/php/simple/runme.php4 create mode 100644 Examples/php/sync/runme.php delete mode 100644 Examples/php/sync/runme.php4 create mode 100644 Examples/php/value/runme.php delete mode 100644 Examples/php/value/runme.php4 create mode 100644 Examples/php/variables/runme.php delete mode 100644 Examples/php/variables/runme.php4 create mode 100644 Examples/test-suite/php/abstract_inherit_ok_runme.php delete mode 100644 Examples/test-suite/php/abstract_inherit_ok_runme.php4 create mode 100644 Examples/test-suite/php/abstract_inherit_runme.php delete mode 100644 Examples/test-suite/php/abstract_inherit_runme.php4 create mode 100644 Examples/test-suite/php/add_link_runme.php delete mode 100644 Examples/test-suite/php/add_link_runme.php4 create mode 100644 Examples/test-suite/php/argout_runme.php delete mode 100644 Examples/test-suite/php/argout_runme.php4 create mode 100644 Examples/test-suite/php/arrayptr_runme.php delete mode 100644 Examples/test-suite/php/arrayptr_runme.php4 create mode 100644 Examples/test-suite/php/arrays_global_runme.php delete mode 100644 Examples/test-suite/php/arrays_global_runme.php4 create mode 100644 Examples/test-suite/php/arrays_global_twodim_runme.php delete mode 100644 Examples/test-suite/php/arrays_global_twodim_runme.php4 create mode 100644 Examples/test-suite/php/arrays_runme.php delete mode 100644 Examples/test-suite/php/arrays_runme.php4 create mode 100644 Examples/test-suite/php/arrays_scope_runme.php delete mode 100644 Examples/test-suite/php/arrays_scope_runme.php4 create mode 100644 Examples/test-suite/php/casts_runme.php delete mode 100644 Examples/test-suite/php/casts_runme.php4 create mode 100644 Examples/test-suite/php/class_ignore_runme.php delete mode 100644 Examples/test-suite/php/class_ignore_runme.php4 create mode 100644 Examples/test-suite/php/conversion_namespace_runme.php delete mode 100644 Examples/test-suite/php/conversion_namespace_runme.php4 create mode 100644 Examples/test-suite/php/conversion_ns_template_runme.php delete mode 100644 Examples/test-suite/php/conversion_ns_template_runme.php4 create mode 100644 Examples/test-suite/php/conversion_runme.php delete mode 100644 Examples/test-suite/php/conversion_runme.php4 create mode 100644 Examples/test-suite/php/cpp_static_runme.php delete mode 100644 Examples/test-suite/php/cpp_static_runme.php4 create mode 100644 Examples/test-suite/php/enum_scope_template_runme.php delete mode 100644 Examples/test-suite/php/enum_scope_template_runme.php4 create mode 100644 Examples/test-suite/php/evil_diamond_ns_runme.php delete mode 100644 Examples/test-suite/php/evil_diamond_ns_runme.php4 create mode 100644 Examples/test-suite/php/evil_diamond_prop_runme.php delete mode 100644 Examples/test-suite/php/evil_diamond_prop_runme.php4 create mode 100644 Examples/test-suite/php/evil_diamond_runme.php delete mode 100644 Examples/test-suite/php/evil_diamond_runme.php4 create mode 100644 Examples/test-suite/php/extend_template_ns_runme.php delete mode 100644 Examples/test-suite/php/extend_template_ns_runme.php4 create mode 100644 Examples/test-suite/php/extend_template_runme.php delete mode 100644 Examples/test-suite/php/extend_template_runme.php4 create mode 100644 Examples/test-suite/php/grouping_runme.php delete mode 100644 Examples/test-suite/php/grouping_runme.php4 create mode 100644 Examples/test-suite/php/ignore_parameter_runme.php delete mode 100644 Examples/test-suite/php/ignore_parameter_runme.php4 create mode 100644 Examples/test-suite/php/li_carrays_runme.php delete mode 100644 Examples/test-suite/php/li_carrays_runme.php4 create mode 100644 Examples/test-suite/php/li_std_string_runme.php delete mode 100644 Examples/test-suite/php/li_std_string_runme.php4 create mode 100644 Examples/test-suite/php/rename_scope_runme.php delete mode 100644 Examples/test-suite/php/rename_scope_runme.php4 create mode 100644 Examples/test-suite/php/skel.php delete mode 100644 Examples/test-suite/php/skel.php4 create mode 100644 Examples/test-suite/php/smart_pointer_rename_runme.php delete mode 100644 Examples/test-suite/php/smart_pointer_rename_runme.php4 create mode 100644 Examples/test-suite/php/sym_runme.php delete mode 100644 Examples/test-suite/php/sym_runme.php4 create mode 100644 Examples/test-suite/php/template_arg_typename_runme.php delete mode 100644 Examples/test-suite/php/template_arg_typename_runme.php4 create mode 100644 Examples/test-suite/php/template_construct_runme.php delete mode 100644 Examples/test-suite/php/template_construct_runme.php4 create mode 100644 Examples/test-suite/php/tests.php delete mode 100644 Examples/test-suite/php/tests.php4 create mode 100644 Examples/test-suite/php/typedef_reference_runme.php delete mode 100644 Examples/test-suite/php/typedef_reference_runme.php4 create mode 100644 Examples/test-suite/php/typemap_ns_using_runme.php delete mode 100644 Examples/test-suite/php/typemap_ns_using_runme.php4 create mode 100644 Examples/test-suite/php/using1_runme.php delete mode 100644 Examples/test-suite/php/using1_runme.php4 create mode 100644 Examples/test-suite/php/using2_runme.php delete mode 100644 Examples/test-suite/php/using2_runme.php4 create mode 100644 Examples/test-suite/php/valuewrapper_base_runme.php delete mode 100644 Examples/test-suite/php/valuewrapper_base_runme.php4 diff --git a/Examples/Makefile.in b/Examples/Makefile.in index 5dbf8b6b7..b95c7e33d 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -746,41 +746,41 @@ ruby_clean: ################################################################## # ------------------------------------------------------------------- -# Build a PHP4 dynamically loadable module (C) +# Build a PHP dynamically loadable module (C) # ------------------------------------------------------------------- -PHP4_INCLUDE = @PHP4INC@ -PHP4_SO = @PHP4_SO@ +PHP_INCLUDE = @PHPINC@ +PHP_SO = @PHP_SO@ -php4: $(SRCS) +php: $(SRCS) $(SWIG) -php5 $(SWIGOPT) $(INTERFACEPATH) - $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PHP4_INCLUDE) - $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP4_SO) + $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PHP_INCLUDE) + $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO) # -------------------------------------------------------------------- -# Build a PHP4 dynamically loadable module (C++) +# Build a PHP dynamically loadable module (C++) # -------------------------------------------------------------------- -php4_cpp: $(SRCS) +php_cpp: $(SRCS) $(SWIG) -php5 -cppext cxx -c++ $(SWIGOPT) $(INTERFACEPATH) - $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP4_INCLUDE) - $(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP4_SO) + $(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP_INCLUDE) + $(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO) # ----------------------------------------------------------------- -# Running a PHP4 example +# Running a PHP example # ----------------------------------------------------------------- -PHP4=@PHP4@ -PHP4SCRIPT ?= runme.php4 +PHP=@PHP@ +PHPSCRIPT ?= runme.php -php4_run: - env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(PHP4) -n -q -d extension_dir=. $(PHP4SCRIPT) +php_run: + env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(PHP) -n -q -d extension_dir=. $(PHPSCRIPT) # ----------------------------------------------------------------- -# Cleaning the PHP4 examples +# Cleaning the PHP examples # ----------------------------------------------------------------- -php4_clean: +php_clean: rm -f *_wrap* *~ .~* example.php php_example.h rm -f core @EXTRA_CLEAN@ rm -f *.@OBJEXT@ *@SO@ diff --git a/Examples/php/class/Makefile b/Examples/php/class/Makefile index 39c4d2f23..252a72660 100644 --- a/Examples/php/class/Makefile +++ b/Examples/php/class/Makefile @@ -9,16 +9,16 @@ SWIGOPT = -noproxy all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp + php_cpp static:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_cpp_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_cpp_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/class/runme.php b/Examples/php/class/runme.php new file mode 100644 index 000000000..a9ca657dc --- /dev/null +++ b/Examples/php/class/runme.php @@ -0,0 +1,64 @@ + diff --git a/Examples/php/class/runme.php4 b/Examples/php/class/runme.php4 deleted file mode 100644 index a9ca657dc..000000000 --- a/Examples/php/class/runme.php4 +++ /dev/null @@ -1,64 +0,0 @@ - diff --git a/Examples/php/constants/Makefile b/Examples/php/constants/Makefile index aed110eb2..23e2675d7 100644 --- a/Examples/php/constants/Makefile +++ b/Examples/php/constants/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/constants/runme.php b/Examples/php/constants/runme.php new file mode 100644 index 000000000..cea06485f --- /dev/null +++ b/Examples/php/constants/runme.php @@ -0,0 +1,28 @@ + diff --git a/Examples/php/constants/runme.php4 b/Examples/php/constants/runme.php4 deleted file mode 100644 index cea06485f..000000000 --- a/Examples/php/constants/runme.php4 +++ /dev/null @@ -1,28 +0,0 @@ - diff --git a/Examples/php/cpointer/Makefile b/Examples/php/cpointer/Makefile index caeec2d73..0862ce5ec 100644 --- a/Examples/php/cpointer/Makefile +++ b/Examples/php/cpointer/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/cpointer/runme.php b/Examples/php/cpointer/runme.php new file mode 100644 index 000000000..f5ef08a3c --- /dev/null +++ b/Examples/php/cpointer/runme.php @@ -0,0 +1,45 @@ + diff --git a/Examples/php/cpointer/runme.php4 b/Examples/php/cpointer/runme.php4 deleted file mode 100644 index f5ef08a3c..000000000 --- a/Examples/php/cpointer/runme.php4 +++ /dev/null @@ -1,45 +0,0 @@ - diff --git a/Examples/php/disown/Makefile b/Examples/php/disown/Makefile index ef3acc773..1bc0beaab 100644 --- a/Examples/php/disown/Makefile +++ b/Examples/php/disown/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp + php_cpp static:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_cpp_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_cpp_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/disown/runme.php b/Examples/php/disown/runme.php new file mode 100644 index 000000000..73d50786b --- /dev/null +++ b/Examples/php/disown/runme.php @@ -0,0 +1,49 @@ +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 truely 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 truely 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/php/disown/runme.php4 b/Examples/php/disown/runme.php4 deleted file mode 100644 index 73d50786b..000000000 --- a/Examples/php/disown/runme.php4 +++ /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 truely 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 truely 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/php/enum/Makefile b/Examples/php/enum/Makefile index 39c4d2f23..252a72660 100644 --- a/Examples/php/enum/Makefile +++ b/Examples/php/enum/Makefile @@ -9,16 +9,16 @@ SWIGOPT = -noproxy all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp + php_cpp static:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_cpp_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_cpp_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/enum/runme.php b/Examples/php/enum/runme.php new file mode 100644 index 000000000..55b0bc4c3 --- /dev/null +++ b/Examples/php/enum/runme.php @@ -0,0 +1,32 @@ + diff --git a/Examples/php/enum/runme.php4 b/Examples/php/enum/runme.php4 deleted file mode 100644 index 55b0bc4c3..000000000 --- a/Examples/php/enum/runme.php4 +++ /dev/null @@ -1,32 +0,0 @@ - diff --git a/Examples/php/funcptr/Makefile b/Examples/php/funcptr/Makefile index caeec2d73..0862ce5ec 100644 --- a/Examples/php/funcptr/Makefile +++ b/Examples/php/funcptr/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/funcptr/runme.php b/Examples/php/funcptr/runme.php new file mode 100644 index 000000000..712d4147c --- /dev/null +++ b/Examples/php/funcptr/runme.php @@ -0,0 +1,24 @@ + + diff --git a/Examples/php/funcptr/runme.php4 b/Examples/php/funcptr/runme.php4 deleted file mode 100644 index 712d4147c..000000000 --- a/Examples/php/funcptr/runme.php4 +++ /dev/null @@ -1,24 +0,0 @@ - - diff --git a/Examples/php/overloading/Makefile b/Examples/php/overloading/Makefile index ef3acc773..1bc0beaab 100644 --- a/Examples/php/overloading/Makefile +++ b/Examples/php/overloading/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp + php_cpp static:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_cpp_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_cpp_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/overloading/runme.php b/Examples/php/overloading/runme.php new file mode 100644 index 000000000..5aa69048d --- /dev/null +++ b/Examples/php/overloading/runme.php @@ -0,0 +1,59 @@ +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(1, 2.1, "quick brown fox", $c, $s) as $o) { + print " ".get_class($o)." $o\n"; + 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/php/overloading/runme.php4 b/Examples/php/overloading/runme.php4 deleted file mode 100644 index 5aa69048d..000000000 --- a/Examples/php/overloading/runme.php4 +++ /dev/null @@ -1,59 +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 "\nHere are some properties of the shapes:\n"; -foreach (array(1, 2.1, "quick brown fox", $c, $s) as $o) { - print " ".get_class($o)." $o\n"; - 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/php/pointer/Makefile b/Examples/php/pointer/Makefile index caeec2d73..0862ce5ec 100644 --- a/Examples/php/pointer/Makefile +++ b/Examples/php/pointer/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/pointer/runme.php b/Examples/php/pointer/runme.php new file mode 100644 index 000000000..5e86de6a2 --- /dev/null +++ b/Examples/php/pointer/runme.php @@ -0,0 +1,35 @@ + diff --git a/Examples/php/pointer/runme.php4 b/Examples/php/pointer/runme.php4 deleted file mode 100644 index 5e86de6a2..000000000 --- a/Examples/php/pointer/runme.php4 +++ /dev/null @@ -1,35 +0,0 @@ - diff --git a/Examples/php/pragmas/Makefile b/Examples/php/pragmas/Makefile index aed110eb2..23e2675d7 100644 --- a/Examples/php/pragmas/Makefile +++ b/Examples/php/pragmas/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/pragmas/runme.php b/Examples/php/pragmas/runme.php new file mode 100755 index 000000000..538548b6f --- /dev/null +++ b/Examples/php/pragmas/runme.php @@ -0,0 +1,5 @@ + diff --git a/Examples/php/pragmas/runme.php4 b/Examples/php/pragmas/runme.php4 deleted file mode 100755 index 538548b6f..000000000 --- a/Examples/php/pragmas/runme.php4 +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/Examples/php/proxy/Makefile b/Examples/php/proxy/Makefile index ef3acc773..1bc0beaab 100644 --- a/Examples/php/proxy/Makefile +++ b/Examples/php/proxy/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp + php_cpp static:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_cpp_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_cpp_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/proxy/runme.php b/Examples/php/proxy/runme.php new file mode 100644 index 000000000..dea80e358 --- /dev/null +++ b/Examples/php/proxy/runme.php @@ -0,0 +1,68 @@ +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/php/proxy/runme.php4 b/Examples/php/proxy/runme.php4 deleted file mode 100644 index dea80e358..000000000 --- a/Examples/php/proxy/runme.php4 +++ /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/php/reference/Makefile b/Examples/php/reference/Makefile index 39c4d2f23..252a72660 100644 --- a/Examples/php/reference/Makefile +++ b/Examples/php/reference/Makefile @@ -9,16 +9,16 @@ SWIGOPT = -noproxy all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp + php_cpp static:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_cpp_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_cpp_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/reference/runme.php b/Examples/php/reference/runme.php new file mode 100644 index 000000000..00aaa5298 --- /dev/null +++ b/Examples/php/reference/runme.php @@ -0,0 +1,78 @@ + diff --git a/Examples/php/reference/runme.php4 b/Examples/php/reference/runme.php4 deleted file mode 100644 index 00aaa5298..000000000 --- a/Examples/php/reference/runme.php4 +++ /dev/null @@ -1,78 +0,0 @@ - diff --git a/Examples/php/simple/Makefile b/Examples/php/simple/Makefile index caeec2d73..0862ce5ec 100644 --- a/Examples/php/simple/Makefile +++ b/Examples/php/simple/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/simple/runme.php b/Examples/php/simple/runme.php new file mode 100755 index 000000000..0e96fe800 --- /dev/null +++ b/Examples/php/simple/runme.php @@ -0,0 +1,25 @@ + diff --git a/Examples/php/simple/runme.php4 b/Examples/php/simple/runme.php4 deleted file mode 100755 index 0e96fe800..000000000 --- a/Examples/php/simple/runme.php4 +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/Examples/php/sync/Makefile b/Examples/php/sync/Makefile index ef3acc773..1bc0beaab 100644 --- a/Examples/php/sync/Makefile +++ b/Examples/php/sync/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp + php_cpp static:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_cpp_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_cpp_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/sync/runme.php b/Examples/php/sync/runme.php new file mode 100644 index 000000000..a7c43474f --- /dev/null +++ b/Examples/php/sync/runme.php @@ -0,0 +1,15 @@ +printer(); + +?> + diff --git a/Examples/php/sync/runme.php4 b/Examples/php/sync/runme.php4 deleted file mode 100644 index a7c43474f..000000000 --- a/Examples/php/sync/runme.php4 +++ /dev/null @@ -1,15 +0,0 @@ -printer(); - -?> - diff --git a/Examples/php/value/Makefile b/Examples/php/value/Makefile index cc383ea3f..9e69d00a4 100644 --- a/Examples/php/value/Makefile +++ b/Examples/php/value/Makefile @@ -9,16 +9,16 @@ SWIGOPT = -noproxy all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/value/runme.php b/Examples/php/value/runme.php new file mode 100644 index 000000000..49115376c --- /dev/null +++ b/Examples/php/value/runme.php @@ -0,0 +1,43 @@ + + + diff --git a/Examples/php/value/runme.php4 b/Examples/php/value/runme.php4 deleted file mode 100644 index 49115376c..000000000 --- a/Examples/php/value/runme.php4 +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/Examples/php/variables/Makefile b/Examples/php/variables/Makefile index caeec2d73..0862ce5ec 100644 --- a/Examples/php/variables/Makefile +++ b/Examples/php/variables/Makefile @@ -9,16 +9,16 @@ SWIGOPT = all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4 + php static:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='myphp4' INTERFACE='$(INTERFACE)' \ - php4_static + SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \ + php_static clean:: - $(MAKE) -f $(TOP)/Makefile php4_clean + $(MAKE) -f $(TOP)/Makefile php_clean rm -f $(TARGET).php check: all - $(MAKE) -f $(TOP)/Makefile php4_run + $(MAKE) -f $(TOP)/Makefile php_run diff --git a/Examples/php/variables/runme.php b/Examples/php/variables/runme.php new file mode 100644 index 000000000..bbfeb610b --- /dev/null +++ b/Examples/php/variables/runme.php @@ -0,0 +1,96 @@ + + diff --git a/Examples/php/variables/runme.php4 b/Examples/php/variables/runme.php4 deleted file mode 100644 index bbfeb610b..000000000 --- a/Examples/php/variables/runme.php4 +++ /dev/null @@ -1,96 +0,0 @@ - - diff --git a/Examples/test-suite/php/Makefile.in b/Examples/test-suite/php/Makefile.in index 9f412bc56..b8aeaaa11 100644 --- a/Examples/test-suite/php/Makefile.in +++ b/Examples/test-suite/php/Makefile.in @@ -1,9 +1,9 @@ ####################################################################### -# Makefile for php4 test-suite +# Makefile for php test-suite ####################################################################### -LANGUAGE = php4 -SCRIPTSUFFIX = _runme.php4 +LANGUAGE = php +SCRIPTSUFFIX = _runme.php srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ @@ -25,19 +25,19 @@ makectests: @bash -ec 'for test in $(C_TEST_CASES) ; do $($(MAKE)) clean && $(MAKE) $${test}.cpptest; done' runcpptests: - @bash -ec 'for test in $(CPP_TEST_CASES) ; do if [ -f $${test}_runme.php4 ] ; then $(MAKE) clean && $(MAKE) $${test}.cpptest; fi ; done' + @bash -ec 'for test in $(CPP_TEST_CASES) ; do if [ -f $${test}_runme.php ] ; then $(MAKE) clean && $(MAKE) $${test}.cpptest; fi ; done' runctests: - @bash -ec 'for test in $(C_TEST_CASES) ; do if [ -f $${test}_runme.php4 ] ; then $(MAKE) clean && $(MAKE) $${test}.cpptest; fi; done' + @bash -ec 'for test in $(C_TEST_CASES) ; do if [ -f $${test}_runme.php ] ; then $(MAKE) clean && $(MAKE) $${test}.cpptest; fi; done' runtests: runcpptests runctests -# write out tests without a _runme.php4 +# write out tests without a _runme.php missingcpptests: - @bash -ec 'for test in $(CPP_TEST_CASES) ; do test -f $${test}_runme.php4 || echo $${test}; done' + @bash -ec 'for test in $(CPP_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done' missingctests: - @bash -ec 'for test in $(C_TEST_CASES) ; do test -f $${test}_runme.php4 || echo $${test}; done' + @bash -ec 'for test in $(C_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done' missingtests: missingcpptests missingctests @@ -58,10 +58,10 @@ missingtests: missingcpptests missingctests +$(run_testcase) # Runs the testcase. A testcase is only run if -# a file is found which has _runme.php4 appended after the testcase name. +# a file is found which has _runme.php appended after the testcase name. run_testcase = \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \ - $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP4SCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL=$(RUNTOOL) php4_run;) \ + $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHPSCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL=$(RUNTOOL) php_run;) \ fi; # Clean: remove the generated .php file @@ -69,4 +69,4 @@ run_testcase = \ @rm -f $*.php; clean: - $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile php4_clean + $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile php_clean diff --git a/Examples/test-suite/php/abstract_inherit_ok_runme.php b/Examples/test-suite/php/abstract_inherit_ok_runme.php new file mode 100644 index 000000000..c2d86499b --- /dev/null +++ b/Examples/test-suite/php/abstract_inherit_ok_runme.php @@ -0,0 +1,12 @@ +blah(),"spam object method"); + +check::done(); +?> diff --git a/Examples/test-suite/php/abstract_inherit_ok_runme.php4 b/Examples/test-suite/php/abstract_inherit_ok_runme.php4 deleted file mode 100644 index 1182e4cec..000000000 --- a/Examples/test-suite/php/abstract_inherit_ok_runme.php4 +++ /dev/null @@ -1,12 +0,0 @@ -blah(),"spam object method"); - -check::done(); -?> diff --git a/Examples/test-suite/php/abstract_inherit_runme.php b/Examples/test-suite/php/abstract_inherit_runme.php new file mode 100644 index 000000000..3554e6fd8 --- /dev/null +++ b/Examples/test-suite/php/abstract_inherit_runme.php @@ -0,0 +1,14 @@ +blah(),"spam object method"); +//check::equal(0,Spam::blah($spam),"spam class method"); + +check::done(); +?> diff --git a/Examples/test-suite/php/abstract_inherit_runme.php4 b/Examples/test-suite/php/abstract_inherit_runme.php4 deleted file mode 100644 index fbc971711..000000000 --- a/Examples/test-suite/php/abstract_inherit_runme.php4 +++ /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/php/add_link_runme.php b/Examples/test-suite/php/add_link_runme.php new file mode 100644 index 000000000..4d8c31d5e --- /dev/null +++ b/Examples/test-suite/php/add_link_runme.php @@ -0,0 +1,23 @@ +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/php/add_link_runme.php4 b/Examples/test-suite/php/add_link_runme.php4 deleted file mode 100644 index b9d5334dd..000000000 --- a/Examples/test-suite/php/add_link_runme.php4 +++ /dev/null @@ -1,23 +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/php/argout_runme.php b/Examples/test-suite/php/argout_runme.php new file mode 100644 index 000000000..1c9026b6c --- /dev/null +++ b/Examples/test-suite/php/argout_runme.php @@ -0,0 +1,37 @@ + diff --git a/Examples/test-suite/php/argout_runme.php4 b/Examples/test-suite/php/argout_runme.php4 deleted file mode 100644 index 1328b0926..000000000 --- a/Examples/test-suite/php/argout_runme.php4 +++ /dev/null @@ -1,37 +0,0 @@ - diff --git a/Examples/test-suite/php/arrayptr_runme.php b/Examples/test-suite/php/arrayptr_runme.php new file mode 100644 index 000000000..717c870d9 --- /dev/null +++ b/Examples/test-suite/php/arrayptr_runme.php @@ -0,0 +1,15 @@ + diff --git a/Examples/test-suite/php/arrayptr_runme.php4 b/Examples/test-suite/php/arrayptr_runme.php4 deleted file mode 100644 index c057a6772..000000000 --- a/Examples/test-suite/php/arrayptr_runme.php4 +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/Examples/test-suite/php/arrays_global_runme.php b/Examples/test-suite/php/arrays_global_runme.php new file mode 100644 index 000000000..59ff7bf2a --- /dev/null +++ b/Examples/test-suite/php/arrays_global_runme.php @@ -0,0 +1,14 @@ + diff --git a/Examples/test-suite/php/arrays_global_runme.php4 b/Examples/test-suite/php/arrays_global_runme.php4 deleted file mode 100644 index d6a3955e1..000000000 --- a/Examples/test-suite/php/arrays_global_runme.php4 +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/Examples/test-suite/php/arrays_global_twodim_runme.php b/Examples/test-suite/php/arrays_global_twodim_runme.php new file mode 100644 index 000000000..d9b62de0d --- /dev/null +++ b/Examples/test-suite/php/arrays_global_twodim_runme.php @@ -0,0 +1,23 @@ + diff --git a/Examples/test-suite/php/arrays_global_twodim_runme.php4 b/Examples/test-suite/php/arrays_global_twodim_runme.php4 deleted file mode 100644 index 352ad2568..000000000 --- a/Examples/test-suite/php/arrays_global_twodim_runme.php4 +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/Examples/test-suite/php/arrays_runme.php b/Examples/test-suite/php/arrays_runme.php new file mode 100644 index 000000000..97ee6bbbf --- /dev/null +++ b/Examples/test-suite/php/arrays_runme.php @@ -0,0 +1,19 @@ +array_c="abc"; +check::equal($as->array_c,"ab",'$as->array_c=="ab"'); + +check::done(); +?> diff --git a/Examples/test-suite/php/arrays_runme.php4 b/Examples/test-suite/php/arrays_runme.php4 deleted file mode 100644 index 407c32c31..000000000 --- a/Examples/test-suite/php/arrays_runme.php4 +++ /dev/null @@ -1,19 +0,0 @@ -array_c="abc"; -check::equal($as->array_c,"ab",'$as->array_c=="ab"'); - -check::done(); -?> diff --git a/Examples/test-suite/php/arrays_scope_runme.php b/Examples/test-suite/php/arrays_scope_runme.php new file mode 100644 index 000000000..92de96920 --- /dev/null +++ b/Examples/test-suite/php/arrays_scope_runme.php @@ -0,0 +1,17 @@ + diff --git a/Examples/test-suite/php/arrays_scope_runme.php4 b/Examples/test-suite/php/arrays_scope_runme.php4 deleted file mode 100644 index 75c7ccf27..000000000 --- a/Examples/test-suite/php/arrays_scope_runme.php4 +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/Examples/test-suite/php/casts_runme.php b/Examples/test-suite/php/casts_runme.php new file mode 100644 index 000000000..03ee6829c --- /dev/null +++ b/Examples/test-suite/php/casts_runme.php @@ -0,0 +1,19 @@ +hello(); + +check::done(); +?> diff --git a/Examples/test-suite/php/casts_runme.php4 b/Examples/test-suite/php/casts_runme.php4 deleted file mode 100644 index c3d19e29e..000000000 --- a/Examples/test-suite/php/casts_runme.php4 +++ /dev/null @@ -1,19 +0,0 @@ -hello(); - -check::done(); -?> diff --git a/Examples/test-suite/php/class_ignore_runme.php b/Examples/test-suite/php/class_ignore_runme.php new file mode 100644 index 000000000..861576026 --- /dev/null +++ b/Examples/test-suite/php/class_ignore_runme.php @@ -0,0 +1,17 @@ + diff --git a/Examples/test-suite/php/class_ignore_runme.php4 b/Examples/test-suite/php/class_ignore_runme.php4 deleted file mode 100644 index 5da23e502..000000000 --- a/Examples/test-suite/php/class_ignore_runme.php4 +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/Examples/test-suite/php/conversion_namespace_runme.php b/Examples/test-suite/php/conversion_namespace_runme.php new file mode 100644 index 000000000..e6866f871 --- /dev/null +++ b/Examples/test-suite/php/conversion_namespace_runme.php @@ -0,0 +1,14 @@ +toFoo(); +check::classname("foo",$foo); + +check::done(); +?> diff --git a/Examples/test-suite/php/conversion_namespace_runme.php4 b/Examples/test-suite/php/conversion_namespace_runme.php4 deleted file mode 100644 index ae49d2002..000000000 --- a/Examples/test-suite/php/conversion_namespace_runme.php4 +++ /dev/null @@ -1,14 +0,0 @@ -toFoo(); -check::classname("foo",$foo); - -check::done(); -?> diff --git a/Examples/test-suite/php/conversion_ns_template_runme.php b/Examples/test-suite/php/conversion_ns_template_runme.php new file mode 100644 index 000000000..9702eedb7 --- /dev/null +++ b/Examples/test-suite/php/conversion_ns_template_runme.php @@ -0,0 +1,10 @@ + diff --git a/Examples/test-suite/php/conversion_ns_template_runme.php4 b/Examples/test-suite/php/conversion_ns_template_runme.php4 deleted file mode 100644 index e799cdd48..000000000 --- a/Examples/test-suite/php/conversion_ns_template_runme.php4 +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/Examples/test-suite/php/conversion_runme.php b/Examples/test-suite/php/conversion_runme.php new file mode 100644 index 000000000..69ade46db --- /dev/null +++ b/Examples/test-suite/php/conversion_runme.php @@ -0,0 +1,14 @@ +toFoo(); +check::classname("foo",$foo); + +check::done(); +?> diff --git a/Examples/test-suite/php/conversion_runme.php4 b/Examples/test-suite/php/conversion_runme.php4 deleted file mode 100644 index 7941a7bbe..000000000 --- a/Examples/test-suite/php/conversion_runme.php4 +++ /dev/null @@ -1,14 +0,0 @@ -toFoo(); -check::classname("foo",$foo); - -check::done(); -?> diff --git a/Examples/test-suite/php/cpp_static_runme.php b/Examples/test-suite/php/cpp_static_runme.php new file mode 100644 index 000000000..54dbfc7d8 --- /dev/null +++ b/Examples/test-suite/php/cpp_static_runme.php @@ -0,0 +1,15 @@ + diff --git a/Examples/test-suite/php/cpp_static_runme.php4 b/Examples/test-suite/php/cpp_static_runme.php4 deleted file mode 100644 index b7f987505..000000000 --- a/Examples/test-suite/php/cpp_static_runme.php4 +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/Examples/test-suite/php/enum_scope_template_runme.php b/Examples/test-suite/php/enum_scope_template_runme.php new file mode 100644 index 000000000..7cea23911 --- /dev/null +++ b/Examples/test-suite/php/enum_scope_template_runme.php @@ -0,0 +1,17 @@ + diff --git a/Examples/test-suite/php/enum_scope_template_runme.php4 b/Examples/test-suite/php/enum_scope_template_runme.php4 deleted file mode 100644 index 40efc5743..000000000 --- a/Examples/test-suite/php/enum_scope_template_runme.php4 +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/Examples/test-suite/php/evil_diamond_ns_runme.php b/Examples/test-suite/php/evil_diamond_ns_runme.php new file mode 100644 index 000000000..b76d1443f --- /dev/null +++ b/Examples/test-suite/php/evil_diamond_ns_runme.php @@ -0,0 +1,19 @@ + diff --git a/Examples/test-suite/php/evil_diamond_ns_runme.php4 b/Examples/test-suite/php/evil_diamond_ns_runme.php4 deleted file mode 100644 index 29e8cd520..000000000 --- a/Examples/test-suite/php/evil_diamond_ns_runme.php4 +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/Examples/test-suite/php/evil_diamond_prop_runme.php b/Examples/test-suite/php/evil_diamond_prop_runme.php new file mode 100644 index 000000000..6f66d01c5 --- /dev/null +++ b/Examples/test-suite/php/evil_diamond_prop_runme.php @@ -0,0 +1,38 @@ +_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"); +check::equal(3,$spam->_baz,"3==spam->_baz"); +check::equal(4,$spam->_spam,"4==spam->_spam"); + +check::done(); +?> diff --git a/Examples/test-suite/php/evil_diamond_prop_runme.php4 b/Examples/test-suite/php/evil_diamond_prop_runme.php4 deleted file mode 100644 index c0b157fca..000000000 --- a/Examples/test-suite/php/evil_diamond_prop_runme.php4 +++ /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"); -check::equal(3,$spam->_baz,"3==spam->_baz"); -check::equal(4,$spam->_spam,"4==spam->_spam"); - -check::done(); -?> diff --git a/Examples/test-suite/php/evil_diamond_runme.php b/Examples/test-suite/php/evil_diamond_runme.php new file mode 100644 index 000000000..a6ef211b1 --- /dev/null +++ b/Examples/test-suite/php/evil_diamond_runme.php @@ -0,0 +1,17 @@ + diff --git a/Examples/test-suite/php/evil_diamond_runme.php4 b/Examples/test-suite/php/evil_diamond_runme.php4 deleted file mode 100644 index 677813bfa..000000000 --- a/Examples/test-suite/php/evil_diamond_runme.php4 +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/Examples/test-suite/php/extend_template_ns_runme.php b/Examples/test-suite/php/extend_template_ns_runme.php new file mode 100644 index 000000000..604e0470e --- /dev/null +++ b/Examples/test-suite/php/extend_template_ns_runme.php @@ -0,0 +1,13 @@ +test1(2),"test1"); +check::equal(3,$foo->test2(3),"test2"); + +check::done(); +?> diff --git a/Examples/test-suite/php/extend_template_ns_runme.php4 b/Examples/test-suite/php/extend_template_ns_runme.php4 deleted file mode 100644 index 16a6434bf..000000000 --- a/Examples/test-suite/php/extend_template_ns_runme.php4 +++ /dev/null @@ -1,13 +0,0 @@ -test1(2),"test1"); -check::equal(3,$foo->test2(3),"test2"); - -check::done(); -?> diff --git a/Examples/test-suite/php/extend_template_runme.php b/Examples/test-suite/php/extend_template_runme.php new file mode 100644 index 000000000..bf77e9b1c --- /dev/null +++ b/Examples/test-suite/php/extend_template_runme.php @@ -0,0 +1,13 @@ +test1(2),"test1"); +check::equal(3,$foo->test2(3),"test2"); + +check::done(); +?> diff --git a/Examples/test-suite/php/extend_template_runme.php4 b/Examples/test-suite/php/extend_template_runme.php4 deleted file mode 100644 index c12f330a5..000000000 --- a/Examples/test-suite/php/extend_template_runme.php4 +++ /dev/null @@ -1,13 +0,0 @@ -test1(2),"test1"); -check::equal(3,$foo->test2(3),"test2"); - -check::done(); -?> diff --git a/Examples/test-suite/php/grouping_runme.php b/Examples/test-suite/php/grouping_runme.php new file mode 100644 index 000000000..8a2a88fa9 --- /dev/null +++ b/Examples/test-suite/php/grouping_runme.php @@ -0,0 +1,23 @@ + diff --git a/Examples/test-suite/php/grouping_runme.php4 b/Examples/test-suite/php/grouping_runme.php4 deleted file mode 100644 index 45e321fd3..000000000 --- a/Examples/test-suite/php/grouping_runme.php4 +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/Examples/test-suite/php/ignore_parameter_runme.php b/Examples/test-suite/php/ignore_parameter_runme.php new file mode 100644 index 000000000..745720c3c --- /dev/null +++ b/Examples/test-suite/php/ignore_parameter_runme.php @@ -0,0 +1,39 @@ +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/php/ignore_parameter_runme.php4 b/Examples/test-suite/php/ignore_parameter_runme.php4 deleted file mode 100644 index 8a2bf899e..000000000 --- a/Examples/test-suite/php/ignore_parameter_runme.php4 +++ /dev/null @@ -1,39 +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/php/li_carrays_runme.php b/Examples/test-suite/php/li_carrays_runme.php new file mode 100644 index 000000000..babf8443b --- /dev/null +++ b/Examples/test-suite/php/li_carrays_runme.php @@ -0,0 +1,15 @@ + diff --git a/Examples/test-suite/php/li_carrays_runme.php4 b/Examples/test-suite/php/li_carrays_runme.php4 deleted file mode 100644 index b0b93dafe..000000000 --- a/Examples/test-suite/php/li_carrays_runme.php4 +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/Examples/test-suite/php/li_std_string_runme.php b/Examples/test-suite/php/li_std_string_runme.php new file mode 100644 index 000000000..c7270df3d --- /dev/null +++ b/Examples/test-suite/php/li_std_string_runme.php @@ -0,0 +1,32 @@ +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/php/li_std_string_runme.php4 b/Examples/test-suite/php/li_std_string_runme.php4 deleted file mode 100644 index fb3da3598..000000000 --- a/Examples/test-suite/php/li_std_string_runme.php4 +++ /dev/null @@ -1,32 +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/php/rename_scope_runme.php b/Examples/test-suite/php/rename_scope_runme.php new file mode 100644 index 000000000..33925a6db --- /dev/null +++ b/Examples/test-suite/php/rename_scope_runme.php @@ -0,0 +1,17 @@ + diff --git a/Examples/test-suite/php/rename_scope_runme.php4 b/Examples/test-suite/php/rename_scope_runme.php4 deleted file mode 100644 index ad86321d3..000000000 --- a/Examples/test-suite/php/rename_scope_runme.php4 +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/Examples/test-suite/php/skel.php b/Examples/test-suite/php/skel.php new file mode 100644 index 000000000..780a999ed --- /dev/null +++ b/Examples/test-suite/php/skel.php @@ -0,0 +1,15 @@ + diff --git a/Examples/test-suite/php/skel.php4 b/Examples/test-suite/php/skel.php4 deleted file mode 100644 index d6f33758d..000000000 --- a/Examples/test-suite/php/skel.php4 +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/Examples/test-suite/php/smart_pointer_rename_runme.php b/Examples/test-suite/php/smart_pointer_rename_runme.php new file mode 100644 index 000000000..a1759cb95 --- /dev/null +++ b/Examples/test-suite/php/smart_pointer_rename_runme.php @@ -0,0 +1,28 @@ +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/php/smart_pointer_rename_runme.php4 b/Examples/test-suite/php/smart_pointer_rename_runme.php4 deleted file mode 100644 index 5f21b6dda..000000000 --- a/Examples/test-suite/php/smart_pointer_rename_runme.php4 +++ /dev/null @@ -1,28 +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/php/sym_runme.php b/Examples/test-suite/php/sym_runme.php new file mode 100644 index 000000000..a6d2a6c74 --- /dev/null +++ b/Examples/test-suite/php/sym_runme.php @@ -0,0 +1,23 @@ +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/php/sym_runme.php4 b/Examples/test-suite/php/sym_runme.php4 deleted file mode 100644 index ce89ea4b2..000000000 --- a/Examples/test-suite/php/sym_runme.php4 +++ /dev/null @@ -1,23 +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/php/template_arg_typename_runme.php b/Examples/test-suite/php/template_arg_typename_runme.php new file mode 100644 index 000000000..58835eafe --- /dev/null +++ b/Examples/test-suite/php/template_arg_typename_runme.php @@ -0,0 +1,19 @@ + diff --git a/Examples/test-suite/php/template_arg_typename_runme.php4 b/Examples/test-suite/php/template_arg_typename_runme.php4 deleted file mode 100644 index 7062c674e..000000000 --- a/Examples/test-suite/php/template_arg_typename_runme.php4 +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/Examples/test-suite/php/template_construct_runme.php b/Examples/test-suite/php/template_construct_runme.php new file mode 100644 index 000000000..3a3986f7e --- /dev/null +++ b/Examples/test-suite/php/template_construct_runme.php @@ -0,0 +1,11 @@ + diff --git a/Examples/test-suite/php/template_construct_runme.php4 b/Examples/test-suite/php/template_construct_runme.php4 deleted file mode 100644 index d0fbc9bb7..000000000 --- a/Examples/test-suite/php/template_construct_runme.php4 +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/Examples/test-suite/php/tests.php b/Examples/test-suite/php/tests.php new file mode 100644 index 000000000..36e9f4163 --- /dev/null +++ b/Examples/test-suite/php/tests.php @@ -0,0 +1,227 @@ + diff --git a/Examples/test-suite/php/tests.php4 b/Examples/test-suite/php/tests.php4 deleted file mode 100644 index 36e9f4163..000000000 --- a/Examples/test-suite/php/tests.php4 +++ /dev/null @@ -1,227 +0,0 @@ - diff --git a/Examples/test-suite/php/typedef_reference_runme.php b/Examples/test-suite/php/typedef_reference_runme.php new file mode 100644 index 000000000..88a70f8d3 --- /dev/null +++ b/Examples/test-suite/php/typedef_reference_runme.php @@ -0,0 +1,13 @@ + diff --git a/Examples/test-suite/php/typedef_reference_runme.php4 b/Examples/test-suite/php/typedef_reference_runme.php4 deleted file mode 100644 index 2c64efce6..000000000 --- a/Examples/test-suite/php/typedef_reference_runme.php4 +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/Examples/test-suite/php/typemap_ns_using_runme.php b/Examples/test-suite/php/typemap_ns_using_runme.php new file mode 100644 index 000000000..6a599f008 --- /dev/null +++ b/Examples/test-suite/php/typemap_ns_using_runme.php @@ -0,0 +1,9 @@ + diff --git a/Examples/test-suite/php/typemap_ns_using_runme.php4 b/Examples/test-suite/php/typemap_ns_using_runme.php4 deleted file mode 100644 index 44403d138..000000000 --- a/Examples/test-suite/php/typemap_ns_using_runme.php4 +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Examples/test-suite/php/using1_runme.php b/Examples/test-suite/php/using1_runme.php new file mode 100644 index 000000000..51841bc78 --- /dev/null +++ b/Examples/test-suite/php/using1_runme.php @@ -0,0 +1,9 @@ + diff --git a/Examples/test-suite/php/using1_runme.php4 b/Examples/test-suite/php/using1_runme.php4 deleted file mode 100644 index ed7e32b06..000000000 --- a/Examples/test-suite/php/using1_runme.php4 +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Examples/test-suite/php/using2_runme.php b/Examples/test-suite/php/using2_runme.php new file mode 100644 index 000000000..391a98f52 --- /dev/null +++ b/Examples/test-suite/php/using2_runme.php @@ -0,0 +1,9 @@ + diff --git a/Examples/test-suite/php/using2_runme.php4 b/Examples/test-suite/php/using2_runme.php4 deleted file mode 100644 index e57f0ce9a..000000000 --- a/Examples/test-suite/php/using2_runme.php4 +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/Examples/test-suite/php/valuewrapper_base_runme.php b/Examples/test-suite/php/valuewrapper_base_runme.php new file mode 100644 index 000000000..aff88486e --- /dev/null +++ b/Examples/test-suite/php/valuewrapper_base_runme.php @@ -0,0 +1,14 @@ + diff --git a/Examples/test-suite/php/valuewrapper_base_runme.php4 b/Examples/test-suite/php/valuewrapper_base_runme.php4 deleted file mode 100644 index 355bb41c5..000000000 --- a/Examples/test-suite/php/valuewrapper_base_runme.php4 +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/Makefile.in b/Makefile.in index 3c41c0394..5fa9e55ef 100644 --- a/Makefile.in +++ b/Makefile.in @@ -49,7 +49,7 @@ skip-guilescm = test -n "@SKIP_GUILESCM@" skip-guile = test -n "@SKIP_GUILE@" skip-mzscheme = test -n "@SKIP_MZSCHEME@" skip-ruby = test -n "@SKIP_RUBY@" -skip-php = test -n "@SKIP_PHP4@" +skip-php = test -n "@SKIP_PHP@" skip-ocaml = test -n "@SKIP_OCAML@" skip-octave = test -n "@SKIP_OCTAVE@" skip-pike = test -n "@SKIP_PIKE@" diff --git a/configure.in b/configure.in index 16ed08374..749d95197 100644 --- a/configure.in +++ b/configure.in @@ -243,10 +243,10 @@ case $host in *) GUILE_SO=$SO;; esac -AC_SUBST(PHP4_SO) +AC_SUBST(PHP_SO) case $host in - *-*-darwin*) PHP4_SO=.so;; - *) PHP4_SO=$SO;; + *-*-darwin*) PHP_SO=.so;; + *) PHP_SO=$SO;; esac AC_SUBST(MZSCHEME_SO) @@ -1329,37 +1329,37 @@ AC_SUBST(RUBYDYNAMICLINKING) # Look for PHP #------------------------------------------------------------------------- -PHP4BIN= +PHPBIN= AC_ARG_WITH(php, AS_HELP_STRING([--without-php], [Disable PHP]) -AS_HELP_STRING([--with-php=path], [Set location of PHP executable]),[ PHP4BIN="$withval"], [PHP4BIN=yes]) +AS_HELP_STRING([--with-php=path], [Set location of PHP executable]),[ PHPBIN="$withval"], [PHPBIN=yes]) # First, check for "--without-php" or "--with-php=no". -if test x"${PHP4BIN}" = xno -o x"${with_alllang}" = xno ; then +if test x"${PHPBIN}" = xno -o x"${with_alllang}" = xno ; then AC_MSG_NOTICE([Disabling PHP]) - PHP4= + PHP= else - if test "x$PHP4BIN" = xyes; then - AC_CHECK_PROGS(PHP4, [php5 php]) + if test "x$PHPBIN" = xyes; then + AC_CHECK_PROGS(PHP, [php5 php]) else - PHP4=$PHP4BIN + PHP=$PHPBIN fi AC_MSG_CHECKING(for PHP header files) dnl /usr/bin/php5 -> /usr/bin/php-config5 - case $PHP4 in + case $PHP in *5) - PHP4CONFIG=`echo "$PHP4"|sed 's/5$/-config5/'` ;; + PHPCONFIG=`echo "$PHP"|sed 's/5$/-config5/'` ;; *) - PHP4CONFIG=$PHP4-config ;; + PHPCONFIG=$PHP-config ;; esac - php_version=`$PHP4CONFIG --version 2>/dev/null` + php_version=`$PHPCONFIG --version 2>/dev/null` case $php_version in 5*) - PHP4INC=`$PHP4CONFIG --includes 2>/dev/null` - if test -n "$PHP4INC"; then - AC_MSG_RESULT($PHP4INC) + PHPINC=`$PHPCONFIG --includes 2>/dev/null` + if test -n "$PHPINC"; then + AC_MSG_RESULT($PHPINC) else AC_MSG_RESULT(not found) fi @@ -1368,8 +1368,8 @@ else AC_MSG_RESULT([found PHP $version, but only PHP 5 is supported]) ;; esac fi -AC_SUBST(PHP4) -AC_SUBST(PHP4INC) +AC_SUBST(PHP) +AC_SUBST(PHPINC) #---------------------------------------------------------------- # Look for ocaml @@ -2003,11 +2003,11 @@ fi AC_SUBST(SKIP_RUBY) -SKIP_PHP4= -if test -z "$PHP4" || test -z "$PHP4INC" ; then - SKIP_PHP4="1" +SKIP_PHP= +if test -z "$PHP" || test -z "$PHPINC" ; then + SKIP_PHP="1" fi -AC_SUBST(SKIP_PHP4) +AC_SUBST(SKIP_PHP) SKIP_OCAML= -- cgit v1.2.1