|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-05-17 16:56 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2010-05-17 16:56 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 19:00:01 2025 UTC |
Description: ------------ hi, I would like to define few variables global so that I can use them in all functions - also if I include a php file with functions. actually I expect, that if I declare a variable outside the functions as global, that those variables are available inside the functions. Test script: --------------- global $var1; function funct1() { echo $var1; } include 'incl_file1'; incl_dile1: function funct2() { echo $var1; } Expected result: ---------------- should work without problem or notice that var1 is not defined...