Doc #52793 [Opn->Bgs]: Output of example code at documention is not as described

From: Date: Tue, 07 Sep 2010 14:26:28 +0000
Subject: Doc #52793 [Opn->Bgs]: Output of example code at documention is not as described
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4990@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52793&edit=1 ID: 52793 Updated by: rquadling@php.net Reported by: jurciks66 at inbox dot lv Summary: Output of example code at documention is not as described -Status: Open +Status: Bogus Type: Documentation Problem Package: Documentation problem Operating System: Linux PHP Version: Irrelevant Block user comment: N New Comment: [2010/09/07 15:23:31] [Z:\] [\\richardquadling\scratch$ ] >php <?php function test() { $foo = "local variable"; echo '$foo in global scope: ' . $GLOBALS["foo"] . "\n"; echo '$foo in current scope: ' . $foo . "\n"; } $foo = "Example content"; test(); ?> ^Z $foo in global scope: Example content $foo in current scope: local variable Code and example output agree. Previous Comments: ------------------------------------------------------------------------ [2010-09-07 16:22:57] jurciks66 at inbox dot lv Description: ------------ Copy and run code from manual about $GLOBALS (http://php.net/manual/en/reserved.variables.globals.php) Actual output is: $foo in global scope: $foo in current scope: local variable Expected result: ---------------- I`m expecting to see the same output as seen on documentation page ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52793&edit=1

« previous php.doc.bugs (#4990) next »