Source

pecl-ev / tests / 02_ev_construct_variation.phpt

Diff from to

tests/02_ev_construct_variation.phpt

 --FILE--
 <?php
 
+class _A {
+	function __destruct() { echo __METHOD__, PHP_EOL; }
+}
+$obj = new _A();
+
 $prev_data = "prev_data";
 $third_data = "new_data";
 
 $loop->data = $third_data;
 var_dump($loop->data);
 
+$loop->data = &$obj;
+var_dump($loop->data);
+
 // Multiple attempts to create the default loop
 $loop2 = EvLoop::defaultLoop();
 $loop2 = EvLoop::defaultLoop();
 $loop = new EvLoop(Ev::FLAG_AUTO);
 // Should be NULL
 var_dump($loop->data);
+$obj = NULL;
 ?>
---CLEAN--
 --EXPECTF--
 string(9) "prev_data"
 string(8) "new data"
 string(12) "new new data"
 string(8) "new_data"
+object(_A)#1 (0) {
+}
 NULL
+_A::__destruct