Last active
March 17, 2016 16:52
-
-
Save c9s/4a371df2192714155131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class A { | |
protected $bar; | |
public function getBar() { | |
return $this->bar; | |
} | |
} | |
$a = new A; | |
$bar = $a->getBar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
± % php -dvld.active=1 obj.php !14934 | |
Finding entry points | |
Branch analysis from position: 0 | |
Jump found. Position 1 = -2 | |
filename: /Users/c9s/src/php/explain/obj.php | |
function name: (null) | |
number of ops: 16 | |
compiled vars: !0 = $a, !1 = $bar | |
line #* E I O op fetch ext return operands | |
------------------------------------------------------------------------------------- | |
2 0 E > EXT_STMT | |
1 NOP | |
12 2 EXT_STMT | |
3 FETCH_CLASS 0 :1 'A' | |
4 EXT_FCALL_BEGIN | |
5 NEW $2 :1 | |
6 DO_FCALL_BY_NAME 0 | |
7 EXT_FCALL_END | |
8 ASSIGN !0, $2 | |
13 9 EXT_STMT | |
10 INIT_METHOD_CALL !0, 'getBar' | |
11 EXT_FCALL_BEGIN | |
12 DO_FCALL_BY_NAME 0 $6 | |
13 EXT_FCALL_END | |
14 ASSIGN !1, $6 | |
14 15 > RETURN 1 | |
branch: # 0; line: 2- 14; sop: 0; eop: 15; out1: -2 | |
path #1: 0, | |
Class A: | |
Function getbar: | |
Finding entry points | |
Branch analysis from position: 0 | |
Jump found. Position 1 = -2 | |
filename: /Users/c9s/src/php/explain/obj.php | |
function name: getBar | |
number of ops: 6 | |
compiled vars: none | |
line #* E I O op fetch ext return operands | |
------------------------------------------------------------------------------------- | |
6 0 E > EXT_NOP | |
7 1 EXT_STMT | |
2 FETCH_OBJ_R $0 'bar' | |
3 > RETURN $0 | |
8 4* EXT_STMT | |
5* > RETURN null | |
branch: # 0; line: 6- 8; sop: 0; eop: 5 | |
path #1: 0, | |
End of function getbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
± % php -dvld.active=1 obj-public.php !14941 | |
Finding entry points | |
Branch analysis from position: 0 | |
Jump found. Position 1 = -2 | |
filename: /Users/c9s/src/php/explain/obj-public.php | |
function name: (null) | |
number of ops: 13 | |
compiled vars: !0 = $a, !1 = $foo | |
line #* E I O op fetch ext return operands | |
------------------------------------------------------------------------------------- | |
2 0 E > EXT_STMT | |
1 NOP | |
6 2 EXT_STMT | |
3 FETCH_CLASS 0 :1 'A' | |
4 EXT_FCALL_BEGIN | |
5 NEW $2 :1 | |
6 DO_FCALL_BY_NAME 0 | |
7 EXT_FCALL_END | |
8 ASSIGN !0, $2 | |
7 9 EXT_STMT | |
10 FETCH_OBJ_R $5 !0, 'foo' | |
11 ASSIGN !1, $5 | |
8 12 > RETURN 1 | |
branch: # 0; line: 2- 8; sop: 0; eop: 12; out1: -2 | |
path #1: 0, | |
Class A: [no user functions] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment