With the following code:
<?php
$example = new class {
public function __construct() {}
public DateTimeImmutable $datetime {
get {
return new DateTimeImmutable();
}
set (mixed $void) {}
}
};
echo $example->datetime->format("c");
Setting a breakpoint on line 7 (the line with return new DateTimeImmutable(); results in:
[4006344] [Step Debug] <- breakpoint_set -i 5 -t line -f file:///home/derick/dev/php/derickr-xdebug/tests/debugger/bug02348.inc -n 7
[4006344] [Step Debug] DEBUG: R: Line number (7) out of range (3-3).
[4006344] [Step Debug] DEBUG: R: Line number (7) in smallest range of range (1-14).
[4006344] [Step Debug] DEBUG: I: Breakpoint line (7) NOT found in set of executable lines.
[4006344] [Step Debug] DEBUG: I: Line (8) not in set.
[4006344] [Step Debug] DEBUG: I: Line (9) not in set.
[4006344] [Step Debug] DEBUG: I: Line (10) not in set.
[4006344] [Step Debug] DEBUG: I: Line (11) not in set.
[4006344] [Step Debug] DEBUG: I: Line (12) not in set.
[4006344] [Step Debug] DEBUG: I: Line (6) not in set.
[4006344] [Step Debug] DEBUG: I: Line (5) not in set.
[4006344] [Step Debug] DEBUG: I: Line (4) not in set.
[4006344] [Step Debug] DEBUG: I: Line (3) not in set.
[4006344] [Step Debug] DEBUG: F: Line (2) in set.
IE, the breakpoint gets set on line 2 (the line with $example = new class {) as it can't find code on line 7. |