Source

pecl-ev / tests / 03_ev_loop_props.phpt

--TEST--
Check for EvLoop class properties
--FILE--
<?php 
function my_print_props($l) {
	echo "backend:";          var_dump($l->backend);
	echo "data:";             var_dump($l->data);
	echo "is_default_loop:";  var_dump($l->is_default_loop);
	echo "iteration:";        var_dump($l->iteration);
	echo "pending:";          var_dump($l->pending);
	echo "io_interval:";      var_dump($l->io_interval);
	echo "timeout_interval:"; var_dump($l->timeout_interval);
	echo "depth:";            var_dump($l->depth);
}

$l                   = EvLoop::defaultLoop();
$l->data             = "ld";
$l->io_interval      = 1.1;
$l->timeout_interval = 1.2;
my_print_props($l);


$flags               = Ev::FLAG_NOENV | Ev::FLAG_NOINOTIFY; /* 17825792 */
$l                   = new EvLoop($flags, "data", 1.1, 1.2);
$l->data             = "ld2";
$l->io_interval      = 2.1;
$l->timeout_interval = 2.2;

var_dump($flags);
my_print_props($l);
?>
--EXPECTF--
backend:int(%d)
data:string(2) "ld"
is_default_loop:bool(true)
iteration:int(0)
pending:int(0)
io_interval:float(1.1)
timeout_interval:float(1.2)
depth:int(0)
int(17825792)
backend:int(%d)
data:string(3) "ld2"
is_default_loop:bool(false)
iteration:int(0)
pending:int(0)
io_interval:float(2.1)
timeout_interval:float(2.2)
depth:int(0)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.