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. // function call
  24. $var = foo($bar$baz$quux);
  25. // function definition
  26. function fooFunction($arg1$arg2 ''
  27. {
  28. if (condition{
  29. statement;
  30. }
  31. return $val;
  32. }
  33. function connect(&$dsn$persistent = false
  34. {
  35. if (is_array($dsn)) {
  36. $dsninfo &$dsn;
  37. else {
  38. $dsninfo = DB::parseDSN($dsn);
  39. }
  40. if (!$dsninfo || !$dsninfo['phptype']{
  41. return $this->raiseError();
  42. }
  43. return true;
  44. }
  45. // In the next line, '#' will be transformed in //
  46. echo '# is not aprecciated!';  # not allowed comment
  47. ?>

Documentation generated on Mon, 11 Mar 2019 14:13:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.