Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.15

Bug #19349 elseif bug
Submitted: 2012-03-26 15:46 UTC
From: overcross Assigned:
Status: Open Package: PHP_Beautifier (version 0.1.15)
PHP Version: 5.3.8 OS: windows xp
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 25 + 9 = ?

 
 [2012-03-26 15:46 UTC] overcross (over cross)
Description: ------------ something wrong about elseif beautifier Test script: --------------- <?php function test(){ global $var; if($var->name == 'x'){ $r1 = 'aa'; $r2 = 'bb'; }elseif($var->name == 'y'){ $r1 = 'cc'; $r2 = 'dd'; }else{ $r1 = 'ee'; $r2 = 'ff'; } } ?> Expected result: ---------------- <?php function test() { global $var; if ($var->name == 'x') { $r1 = 'aa'; $r2 = 'bb'; } elseif ($var->name == 'y') { $r1 = 'cc'; $r2 = 'dd'; } else { $r1 = 'ee'; $r2 = 'ff'; } } ?> Actual result: -------------- <?php function test() { global $var; if ($var->name == 'x') { $r1 = 'aa'; $r2 = 'bb'; } elseif { ($var->name == 'y') { $r1 = 'cc'; } $r2 = 'dd'; } else { $r1 = 'ee'; $r2 = 'ff'; } } ?>

Comments