Bug #52960 [Opn->Bgs]: if(condition); echo "helloworld"; always prints helloworld

From: Date: Thu, 30 Sep 2010 09:30:11 +0000
Subject: Bug #52960 [Opn->Bgs]: if(condition); echo "helloworld"; always prints helloworld
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-154771@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52960&edit=1 ID: 52960 Updated by: pajoye@php.net Reported by: muximus at gmail dot com Summary: if(condition); echo "helloworld"; always prints helloworld -Status: Open +Status: Bogus Type: Bug Package: Unknown/Other Function Operating System: UBUNTU 9.04 PHP Version: 5.2.14 Block user comment: N 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: ------------------------------------------------------------------------ [2010-09-30 11:25:57] muximus at gmail dot com Description: ------------ if you type a semicolon at the end of an it executes code after that, i think it should probably give an warning In the test script "helloworld" will always be printed Test script: --------------- if(condition); echo "helloworld"; Expected result: ---------------- maybe a warning ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52960&edit=1

« previous php.bugs (#154771) next »