PHP_Beautifier
[ class tree: PHP_Beautifier ] [ index: PHP_Beautifier ] [ all elements ]

Source for file example_pear.php

Documentation is available at example_pear.php

  1. <?
  2. // this open tag is replaced by standard <?php
  3. // control structures
  4. if (($a|| ($b)) {
  5. action1();
  6. elseif (($c&& ($d)) {
  7. action2(2);
  8. else {
  9. defaultaction();
  10. }
  11. // switch structure
  12. switch ($condition{
  13. case 1:
  14. action1();
  15. break;
  16. case 2:
  17. action2();
  18. break;
  19. default:
  20. defaultaction();
  21. break;
  22. }
  23.  
  24. for($x=0;$x<50;$x++{
  25.     if($x==25break;}
  26. }
  27. // function call
  28. $var = foo($bar$baz$quux);
  29. // function definition
  30. function fooFunction($arg1$arg2 ''
  31. {
  32. if (condition{
  33. statement;
  34. }
  35. return $val;
  36. }
  37. function connect(&$dsn$persistent = false
  38. {
  39. if (is_array($dsn)) {
  40. $dsninfo &$dsn;
  41. else {
  42. $dsninfo = DB::parseDSN($dsn);
  43. }
  44. if (!$dsninfo || !$dsninfo['phptype']{
  45. return $this->raiseError();
  46. }
  47. return true;
  48. }
  49. // In the next line, '#' will be transformed in //
  50. echo '# is not aprecciated!';  # not allowed comment
  51. ?>

Documentation generated on Mon, 11 Mar 2019 15:37:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.