--TEST-- mysqli_stmt_bind_param() - playing with references --SKIPIF-- --FILE-- label = 'y'; $id_ref = &$GLOBALS['id']; $label_ref = &$label->label; if (true !== ($tmp = mysqli_stmt_bind_param($stmt, "is", $id_ref, $label_ref))) printf("[027] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (true !== @mysqli_stmt_execute($stmt)) printf("[028] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); findRow(29, $link, $id_ref, $label_ref); $id = 103; $label_a = &$label_b; $label_b = &$label_a; $label_a = 'z'; if (true !== ($tmp = mysqli_stmt_bind_param($stmt, "is", $id, $label_b))) printf("[030] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (true !== mysqli_stmt_execute($stmt)) printf("[031] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); findRow(32, $link, $id, $label_b); class foo { public $foo; function foo() { $this->foo = &$this->bar; } } class bar extends foo { public $bar = 'v'; } $bar = new bar(); $id++; $label = &$GLOBALS['bar']->foo; if (true !== ($tmp = mysqli_stmt_bind_param($stmt, "is", $id, $label))) printf("[033] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (true !== mysqli_stmt_execute($stmt)) printf("[034] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); findRow(35, $link, $id, $label); mysqli_stmt_close($stmt); mysqli_close($link); print "done!"; ?> --CLEAN-- --EXPECTF-- done!