#30054 [Opn->Bgs]: not getting the expected output i think i should get

From: Date: Sat, 11 Sep 2004 13:20:41 +0000
Subject: #30054 [Opn->Bgs]: not getting the expected output i think i should get
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66056@lists.php.net to get a copy of this message
ID: 30054 Updated by: derick@php.net Reported By: jon at latchkey dot com -Status: Open +Status: Bogus Bug Type: Output Control Operating System: OSX PHP Version: 5.0.0 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2004-09-10 18:21:27] jon at latchkey dot com Description: ------------ [6][ /private/tmp ]% cat test2.php <? function doA() { return true; } function doB() { return true; } ?> <? if (doA()) { ?>here1<? } else ?> <? if (doB()) { ?>here2<? } ?> <? if (doA()) { ?>here3<? ?> <? } else if (doB()) { ?>here4<? } ?> [7][ /private/tmp ]% php --version PHP 5.0.0 (cli) (built: Aug 3 2004 15:10:22) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.0, Copyright (c) 1998-2004 Zend Technologies [8][ /private/tmp ]% php test2.php here1here2 here3 [9][ /private/tmp ]% Reproduce code: --------------- <? function doA() { return true; } function doB() { return true; } ?> <? if (doA()) { ?>here1<? } else ?> <? if (doB()) { ?>here2<? } ?> <? if (doA()) { ?>here3<? ?> <? } else if (doB()) { ?>here4<? } ?> Expected result: ---------------- here1here2 here3here4 (or a compile error) Actual result: -------------- here1here2 here3 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30054&edit=1

« previous php.bugs (#66056) next »