To quickly summarize my problem, I simply copied the example of (http://php.net/manual/en/language.variables.scope.php) into one of my views and wondered why it was nothing echoed on my screen.
Here the example of php.net:
<?php
$a = 1;
$b = 2;
function Sum()
{
global $a, $b;
$b = $a + $b;
}
Sum();
echo $b;
?>
I expected '3' on my screen but $b returned still '2'.. Well I tested this behavior about 3 hours with different examples and it seems that kohana does some tricky things. I thought Kohana only extracts the View::_data into the local scope and everything would be ok but now I have no clue about it.
Could somebody explain me that behaviour?
How can I wrap PHP legacy code in Kohana? couldn't help me..
Btw, sorry for my language mistakes!
UPDATE:
I know using globals is bad but my clean approach didn't work yesterday.. But now I don't know why everything works again, maybe there was a caching problem.
But besides that I understood the mistake of my given example, thank you. Seems that it has nothing to do with output buffering..