We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89363fa commit 4cb53a0Copy full SHA for 4cb53a0
Zend/tests/new_obj_access_without_parentheses/gc.phpt
@@ -0,0 +1,26 @@
1
+--TEST--
2
+Object instantiated without parentheses is collected
3
+--FILE--
4
+<?php
5
+
6
+class A
7
+{
8
+ public function test(): void
9
+ {
10
+ echo 'called' . PHP_EOL;
11
+ }
12
13
+ public function __destruct()
14
15
+ echo 'collected' . PHP_EOL;
16
17
+}
18
19
+new A()->test();
20
+echo 'code after' . PHP_EOL;
21
22
+?>
23
+--EXPECT--
24
+called
25
+collected
26
+code after
0 commit comments