Kill debugger's usage of pseudomains and varenv
[hiphop-php.git] / hphp / test / quick / debugger / eval1.php.expectf
blob15da4b32cebbe4e9f99bd617c84a8cca54f4f2da
1 Program %s/eval1.php loaded. Type '[r]un' or '[c]ontinue' to go.
2 run
3 eval1.php loaded
4 Program %s/eval1.php exited normally.
5 print function_exists('test1')
6 false
7 @ function test1($x){error_log((string)$x);return $x+1;}
8 print function_exists('test1')
9 true
10 @ $eval1=test1(4)
12 print $eval1
14 print class_exists('test2')
15 false
16 <?php
17 class test2 {
18   public $a;
19   private $b;
20   public function ab() {
21     return $this->a . ":" . $this->b;
22   }
23   public function callCls() {
24     $obj = new cls();
25     return $obj->meth($this);
26   }
27   private function seven() {
28     return 7;
29   }
32 print class_exists('test2')
33 true
34 set bac off
35 BypassAccessCheck(bac) set to off
36 @ $eval2 = new test2()
37 @ $eval2->a = 3
38 @ $eval2->b = 4
39 Hit fatal : Cannot access protected property
40     #0 at [:1]
41     #1 include(), called at [:1]
42     #2 include(), called at [:0]
44 print $eval2->ab()
45 "3:"
46 set bac on
47 BypassAccessCheck(bac) set to on.
48 All code executed from debugger is bypassing access check!
49 @ $eval2->b = 4
50 print $eval2->ab()
51 "3:4"
52 break eval1.php:12
53 Breakpoint 1 set on line 12 of eval1.php
54 print $eval2->callCls()
55 Breakpoint 1 reached at cls::meth() on line 12 of %s/eval1.php
56   11     $a = $this->pub.':'.$this->pri;
57   12*    $b = $this->pub.':'.$this->pri;
58   13     $c = $this->pub.':'.$this->pri;
60 break clear all
61 All breakpoints are cleared.
62 set bac off
63 BypassAccessCheck(bac) set to off
64 @ $this->pub = 21
65 @ $this->pri = 22
66 next
67 Break at cls::meth() on line 13 of %s/eval1.php
68   12     $b = $this->pub.':'.$this->pri;
69   13*    $c = $this->pub.':'.$this->pri;
70   14     return $a.'-'.$b.'-'.$c;
72 @ $this->pub = $x->seven()
73 Hit fatal : Call to private method test2::seven() from context 'cls'
74     #0 at [:1]
75     #1 include(), called at %s/eval1.php:13]
76     #2 cls->meth(), called at [:%d]
77     #3 test2->callCls(), called at [:%d]
78     #4 include(), called at [:%d]
79     #5 include(), called at [:%d]
81 set bac on
82 BypassAccessCheck(bac) set to on.
83 All code executed from debugger is bypassing access check!
84 @ $this->pub = $x->seven()
85 continue
86 "11:12-21:22-7:22"
87 quit