summaryrefslogtreecommitdiffstats
path: root/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'common.php')
-rw-r--r--common.php69
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() {
+
+ }
+ }
+}