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
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue