--TEST-- Runkit_Sandbox['output_handler'] setting --SKIPIF-- --FILE-- echo("foo\n"); $php->echo("Barish\n"); $php->echo("BAZimbly\n"); var_dump($php['output_handler']); function test_handler($str) { if (strlen($str) == 0) return NULL; /* Do nothing with flush events */ /* Echoing and returning have the same effect here, both go to parent's output chain */ echo 'Received string from sandbox: ' . strlen($str) . " bytes long.\n"; return strtoupper($str); } --EXPECT-- Received string from sandbox: 4 bytes long. FOO Received string from sandbox: 7 bytes long. BARISH Received string from sandbox: 9 bytes long. BAZIMBLY string(12) "test_handler"