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.
This commit is contained in:
parent
f7a255c38a
commit
d6d5db122b
201 changed files with 94 additions and 11358 deletions
|
|
@ -50,20 +50,13 @@
|
|||
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
SWIG supports generating wrappers for PHP5 and PHP7. Support for PHP4 was removed
|
||||
in SWIG 1.3.37.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Currently any PHP5 or PHP7 release should work, but we don't regularly test with
|
||||
PHP < 5.3.
|
||||
Currently any PHP7 release should work.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
@ -81,9 +74,9 @@ available.
|
|||
|
||||
|
||||
<p>
|
||||
To build a PHP extension, run swig using the <tt>-php5</tt> or
|
||||
<tt>-php7</tt> option as follows (<tt>-php</tt> is also supported
|
||||
and currently is an alias for <tt>-php5</tt>):
|
||||
To build a PHP extension, run swig using the <tt>-php7</tt> option as follows
|
||||
(<tt>-php</tt> is also supported and currently is an alias for <tt>-php7</tt>
|
||||
but prior to SWIG 4.0.0 it was an alias for <tt>-php5</tt>):
|
||||
</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
|
|
@ -107,9 +100,7 @@ also contain PHP class wrappers.
|
|||
SWIG can generate PHP extensions from C++ libraries as well when
|
||||
given the <tt>-c++</tt> option. The support for C++ is discussed in
|
||||
more detail in <a href="#Php_nn2_6">section 27.2.6</a>. 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 <tt>-cppext</tt> -
|
||||
e.g. if you want example_wrap.cc use <tt>-cppext cc</tt>.
|
||||
</p>
|
||||
|
|
@ -172,8 +163,8 @@ PHP script which uses your extension:
|
|||
</pre></div>
|
||||
|
||||
<p>
|
||||
But note that this doesn't work when running PHP through a webserver in PHP5.3
|
||||
and later - you'll need to use <tt>extension</tt> in <tt>php.ini</tt> as
|
||||
But note that <tt>dl()</tt> isn't supported when running PHP through a
|
||||
webserver - you'll need to use <tt>extension</tt> in <tt>php.ini</tt> as
|
||||
described above.
|
||||
</p>
|
||||
|
||||
|
|
@ -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 <tt>%rename</tt> 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.
|
||||
</p>
|
||||
|
||||
<H3><a name="Php_nn2_1">35.2.1 Constants</a></H3>
|
||||
|
|
@ -525,13 +517,6 @@ this, one needs to include <b>phppointers.i</b> which defines the
|
|||
named typemap REF.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In case you write your own typemaps, SWIG supports an attribute called
|
||||
<tt>byref</tt>: if you set that, then SWIG will make sure that the generated
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -131,7 +131,6 @@ can be obtained by typing <tt>swig -help</tt> or <tt>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 <tt>swig -help</tt> or <tt>swig
|
|||
|
||||
-c++ Enable C++ processing
|
||||
-cppext <em>ext</em> Change file extension of C++ generated files to <em>ext</em>
|
||||
(default is cxx, except for PHP5 which uses cpp)
|
||||
(default is cxx)
|
||||
-D<em>symbol</em> Define a preprocessor symbol
|
||||
-Fmicrosoft Display error/warning messages in Microsoft format
|
||||
-Fstandard Display error/warning messages in commonly used format
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue