@PER-CS2.0.test-in.php 781 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?
  2. namespace Vendor\Package;
  3. use const BAR;
  4. use function foo;
  5. use \FooInterfaceA, FooInterfaceB;
  6. use \BarClass as Bar;
  7. use OtherVendor\OtherPackage\BazClass;
  8. class Foo extends Bar implements FooInterfaceA{
  9. var $aaa = 1, $bbb = 2;
  10. public function sampleFunction($a, $arg1, $arg2, $arg3, $foo, $b = null)
  11. {
  12. if ($a === $b) {
  13. bar();
  14. } else if ($a > $b) {
  15. $foo->bar($arg1);
  16. } else {
  17. BazClass::bar($arg2, $arg3);
  18. }
  19. $combined = $a.$b;
  20. STATIC::baz();
  21. }
  22. use FooTrait, BarTrait;
  23. static public final function bar() {
  24. // method body
  25. }
  26. }
  27. class Aaa implements
  28. Bbb, Ccc,
  29. Ddd
  30. {
  31. }
  32. $a = new Foo;
  33. $b = (boolean) 1;
  34. $c = true ? (INT) '1' : 2;
  35. ?>