Skip to content

Commit 66908f1

Browse files
committed
Add a test case for "New objects cannot be assigned by reference"
1 parent e0f5bde commit 66908f1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testcases.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,8 @@ trait numeric { /*...*/ }
122122
mysql_tablename();
123123
mysql_thread_id();
124124
mysql_unbuffered_query();
125-
?>
125+
126+
// New objects cannot be assigned by reference
127+
class C {}
128+
$c =& new C;
129+
$c =&new C;

0 commit comments

Comments
 (0)