diff options
author | Remi Collet <remi@remirepo.net> | 2017-08-15 08:28:02 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-08-15 08:28:02 +0200 |
commit | 5a44622dce86f85194c2d0563cffd8bb96c3f83d (patch) | |
tree | bd829bd5fa809d5dea73ef0049860879e6940377 /common.php |
New package, v0.0.1, devel
Diffstat (limited to 'common.php')
-rw-r--r-- | common.php | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/common.php b/common.php new file mode 100644 index 0000000..7d06872 --- /dev/null +++ b/common.php @@ -0,0 +1,69 @@ +<?php + +namespace +{ + function bar() + { + return 1; + } + + function foo($x) + { + $sum = 0; + for ($idx = 0; $idx < $x; $idx++) { + $sum += bar(); + } + return $sum; + } + + function add($a, $b) + { + return $a + $b; + } + + class Foo + { + public $val; + + public function __construct($val = null) + { + $this->val = $val; + } + + public static function asdf() + { + return 'qwer'; + } + + public static function plus($a, $b) + { + return $a + $b; + } + + public function bar() + { + return 1; + } + + public function add($a, $b) + { + return $a + $b; + } + + public function context() + { + return opencensus_trace_context(); + } + } +} + +namespace Illuminate\Database\Eloquent +{ + // fake class with method we know is traced + class Model + { + public function delete() { + + } + } +} |