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  


 [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