959d6b5d3d
Added some test cases. Also now permit caller=>func() type of breakpoints. To make this work, I added a method, getCallingSite, to class InterruptSite and use this to walk the stack when checking if a site matches a break point that has more than one function name.
34 linhas
598 B
PHP
34 linhas
598 B
PHP
<?php
|
|
|
|
// Warning: line numbers are sensitive, do not change
|
|
|
|
function foo($x) {
|
|
$y = $x.'_suffix';
|
|
error_log($y);
|
|
}
|
|
|
|
class cls {
|
|
public function pubObj($x) {
|
|
error_log("pubObj:".$x);
|
|
}
|
|
public static function pubCls($x) {
|
|
error_log("pubCls:".$x);
|
|
}
|
|
public function pubHardBreak($x) {
|
|
error_log("pubHardBreak:".$x);
|
|
hphpd_break();
|
|
error_log("pubHardBreak:done");
|
|
}
|
|
}
|
|
|
|
class derived extends cls {
|
|
public function callPubObj($x) {
|
|
$this->pubObj($x);
|
|
}
|
|
public function callCallPubObj($x) {
|
|
$this->callPubObj($x);
|
|
}
|
|
}
|
|
|
|
error_log('break1.php loaded');
|