summaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-05-05 17:37:25 +0000
committerDmitry Stogov <dmitry@php.net>2005-05-05 17:37:25 +0000
commit79d6f11a4a3f6da55fa05b156fe8ff8accc3ff06 (patch)
tree787b9e929b8f1f2f77e673879f516a0a47629381 /tests/lang
parent929e3851f2ae5b28039fb014075354aa52966118 (diff)
downloadphp-git-79d6f11a4a3f6da55fa05b156fe8ff8accc3ff06.tar.gz
Fixed bug #31525 (object reference being dropped. $this getting lost)
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/bug20175.phpt7
-rw-r--r--tests/lang/bug21600.phpt9
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt
index 55ff7d82b8..d2248e6f0e 100644
--- a/tests/lang/bug20175.phpt
+++ b/tests/lang/bug20175.phpt
@@ -2,6 +2,8 @@
Bug #20175 (Static vars can't store ref to new instance)
--SKIPIF--
<?php if (version_compare(zend_version(),'2.0.0-dev','<')) die('skip ZE1 does not have static class members'); ?>
+--INI--
+error_reporting=4095
--FILE--
<?php
print zend_version()."\n";
@@ -145,10 +147,11 @@ foo_static()
foo:1
bar_static()
bar_global()
+
+Strict Standards: Only variables should be assigned by reference in %sbug20175.php on line 47
bar:1
bar_static()
-bar_global()
-bar:2
+bar:1
wow_static()
wow_global()
wow:1
diff --git a/tests/lang/bug21600.phpt b/tests/lang/bug21600.phpt
index c3f832b9ea..6ecf69a11f 100644
--- a/tests/lang/bug21600.phpt
+++ b/tests/lang/bug21600.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #21600 (assign by reference function call changes variable contents)
+--INI--
+error_reporting=4095
--FILE--
<?php
$tmp = array();
@@ -23,11 +25,14 @@ function fubar($text){
return $text;
}
?>
---EXPECT--
+--EXPECTF--
+Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 4
array(1) {
["foo"]=>
- &string(4) "test"
+ string(4) "test"
}
+
+Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 11
array(1) {
["foo"]=>
string(4) "test"