Commit graph

6 commits

Author SHA1 Message Date
Olly Betts
1f1349741f
[php] Generate PHP type declarations
We now automatically generate PHP type declarations for PHP >= 8.0.

The generated code still compiles with PHP 7.x but without type declarations.
2022-01-20 10:07:44 +13:00
Olly Betts
cdc69f9843 php: Throw exceptions instead of using errors
Parameter type errors and some other cases in SWIG-generated wrappers
now throw a PHP exception, which is how PHP's native parameter handling
deals with similar situations.

See #2014, but not closing yet as there may be more cases to convert.
2021-05-25 16:42:12 +12:00
Olly Betts
26f218327b Don't special case NULL in the REF in typemap
PHP doesn't accept literal NULL for a parameter passed by reference;
passing a variable with a value of NULL is just like passing a
variable with a different value - we get a PHP reference to the
variable, not NULL.
2021-04-20 16:24:18 +12:00
Olly Betts
1169874f59 [PHP] Add support for PHP7.
PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
2016-11-30 13:05:59 +13:00
Miklos Vajna
227192f80a Fix Examples/php/pointer to work with PHP 5.5
With this, all examples work with PHP 5.5 for me.
2013-12-12 15:52:51 +13:00
Olly Betts
7dfd9aae31 WARN_* constants are user visible, so keep existing WARN_PHP4_* for
backward compatibility, but add preferred forms WARN_PHP_* and use
these ourselves.

Rename Lib/php4 to Lib/php, Source/Modules/php4.cxx to Source/Modules/php.cxx.
 
Add typemaps for const reference so Examples/test-suite/apply_signed_char.i
works.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-03 00:09:56 +00:00
Renamed from Lib/php4/phppointers.i (Browse further)