|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-07 02:52 UTC] derick@php.net
[2018-03-29 17:16 UTC] cmb@php.net
-Package: Feature/Change Request
+Package: Scripting Engine problem
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 18:00:01 2025 UTC |
if (1==1) { if (1==2) { echo 'blah'; } else { test('test'); } <--RIGHT HERE function test ($blah) { echo $blah; } } This script gives the error: Fatal error: Call to undefined function: test() <line 6>. PHP should have recognized that since the first if statement was true, all functions in the scope of that if statement should be declared. If I move the function declaration to before I use it, it works.