Created
June 17, 2013 16:14
-
-
Save srgoogleguy/5798137 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
googleguy@googleguy-pc:~/aa/test$ php -dvld.active=1 /tmp/static.php | |
Finding entry points | |
Branch analysis from position: 0 | |
Return found | |
filename: /tmp/static.php | |
function name: (null) | |
number of ops: 9 | |
compiled vars: none | |
line # * op fetch ext return operands | |
--------------------------------------------------------------------------------- | |
2 0 > NOP | |
6 1 DO_FCALL 0 $0 'memory_get_usage' | |
2 SEND_VAR_NO_REF 6 $0 | |
3 DO_FCALL 1 'var_dump' | |
7 4 DO_FCALL 0 'foo' | |
8 5 DO_FCALL 0 $3 'memory_get_usage' | |
6 SEND_VAR_NO_REF 6 $3 | |
7 DO_FCALL 1 'var_dump' | |
9 8 > RETURN 1 | |
branch: # 0; line: 2- 9; sop: 0; eop: 8 | |
path #1: 0, | |
Function foo: | |
Finding entry points | |
Branch analysis from position: 0 | |
Return found | |
filename: /tmp/static.php | |
function name: foo | |
number of ops: 3 | |
compiled vars: !0 = $bar | |
line # * op fetch ext return operands | |
--------------------------------------------------------------------------------- | |
3 0 > FETCH_W static $0 'bar' | |
1 ASSIGN_REF !0, $0 | |
4 2 > RETURN null | |
branch: # 0; line: 3- 4; sop: 0; eop: 2 | |
path #1: 0, | |
End of function foo. | |
int(227208) | |
int(227240) |
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 | |
function foo() { | |
static $bar = "1234567890123456789012345678901234567890"; | |
} | |
var_dump(memory_get_usage()); | |
foo(); | |
var_dump(memory_get_usage()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment