From bef3cfe594d292576d53b39b385fa4e32b6bb14d Mon Sep 17 00:00:00 2001
From: Olly Betts
Date: Thu, 12 Dec 2013 16:06:00 +1300
Subject: Add CHANGES.current entry and minimal doc update for previous change
---
CHANGES.current | 7 +++++++
Doc/Manual/Php.html | 11 ++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/CHANGES.current b/CHANGES.current
index 597a0e853..719fbe879 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -5,6 +5,13 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.0 (in progress)
============================
+2013-12-12: vmiklos
+ [PHP] PHP's peculiar call-time pass-by-reference feature was
+ deprecated in PHP 5.3 and removed in PHP 5.4, so update the REF
+ typemaps in phppointers.i to specify pass-by-reference in the
+ function definition. Examples/php/pointer has been updated
+ accordingly.
+
2013-12-12: olly
[PHP] The usage of $input in PHP directorout typemaps has been
changed to be consistent with other languages. The typemaps
diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html
index 78ee6ea7f..185883235 100644
--- a/Doc/Manual/Php.html
+++ b/Doc/Manual/Php.html
@@ -503,13 +503,14 @@ echo "The sum $in1 + $in2 = $result\n";
Because PHP has a native concept of reference, it may seem more natural
to the PHP developer to use references to pass pointers. To enable
this, one needs to include phppointers.i which defines the
-named typemap REFERENCE.
+named typemap REF.
-However, this relies on call-time pass-by-reference, which has been
-deprecated in PHP for some time, and was finally removed in PHP 5.4.
-So you should avoid creating new wrappers which rely on this approach.
+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.
@@ -532,7 +533,7 @@ include("example.php");
$in1 = 3;
$in2 = 5;
$result = 0;
-add(&$in1,&$in2,&$result);
+add($in1,$in2,$result);
echo "The sum $in1 + $in2 = $result\n";
?>
--
cgit v1.2.3