Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename: /in/336C9
function name: (null)
number of ops: 18
compiled vars: !0 = $queue
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
22 0 E > DECLARE_CLASS 'refactoringguru%5Ccommand%5Crealworld%5Cwebscrapingcommand'
88 1 DECLARE_CLASS 'refactoringguru%5Ccommand%5Crealworld%5Cimdbgenresscrapingcommand', 'refactoringguru%5Ccommand%5Crealworld%5Cwebscrapingcommand'
113 2 DECLARE_CLASS 'refactoringguru%5Ccommand%5Crealworld%5Cimdbgenrepagescrapingcommand', 'refactoringguru%5Ccommand%5Crealworld%5Cwebscrapingcommand'
152 3 DECLARE_CLASS 'refactoringguru%5Ccommand%5Crealworld%5Cimdbmoviescrapingcommand', 'refactoringguru%5Ccommand%5Crealworld%5Cwebscrapingcommand'
255 4 INIT_STATIC_METHOD_CALL 'RefactoringGuru%5CCommand%5CRealWorld%5CQueue', 'get'
5 DO_FCALL 0 $1
6 ASSIGN !0, $1
257 7 INIT_METHOD_CALL !0, 'isEmpty'
8 DO_FCALL 0 $3
9 > JMPZ $3, ->15
258 10 > INIT_METHOD_CALL !0, 'add'
11 NEW $4 'RefactoringGuru%5CCommand%5CRealWorld%5CIMDBGenresScrapingCommand'
12 DO_FCALL 0
13 SEND_VAR_NO_REF_EX $4
14 DO_FCALL 0
261 15 > INIT_METHOD_CALL !0, 'work'
16 DO_FCALL 0
17 > RETURN 1
Class RefactoringGuru\Command\RealWorld\Command:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: execute
number of ops: 1
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
11 0 E > > RETURN null
End of function execute
Function getid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: getId
number of ops: 2
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
13 0 E > VERIFY_RETURN_TYPE
1 > RETURN null
End of function getid
Function getstatus:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: getStatus
number of ops: 2
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
15 0 E > VERIFY_RETURN_TYPE
1 > RETURN null
End of function getstatus
End of class RefactoringGuru\Command\RealWorld\Command.
Class RefactoringGuru\Command\RealWorld\WebScrapingCommand:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: __construct
number of ops: 4
compiled vars: !0 = $url
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
33 0 E > RECV !0
35 1 ASSIGN_OBJ 'url'
2 OP_DATA !0
36 3 > RETURN null
End of function __construct
Function getid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: getId
number of ops: 5
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
40 0 E > FETCH_OBJ_R ~0 'id'
1 VERIFY_RETURN_TYPE ~0
2 > RETURN ~0
41 3* VERIFY_RETURN_TYPE
4* > RETURN null
End of function getid
Function getstatus:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: getStatus
number of ops: 5
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
45 0 E > FETCH_OBJ_R ~0 'status'
1 VERIFY_RETURN_TYPE ~0
2 > RETURN ~0
46 3* VERIFY_RETURN_TYPE
4* > RETURN null
End of function getstatus
Function geturl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: getURL
number of ops: 5
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
50 0 E > FETCH_OBJ_R ~0 'url'
1 VERIFY_RETURN_TYPE ~0
2 > RETURN ~0
51 3* VERIFY_RETURN_TYPE
4* > RETURN null
End of function geturl
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: execute
number of ops: 9
compiled vars: !0 = $html
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
63 0 E > INIT_METHOD_CALL 'download'
1 DO_FCALL 0 $1
2 ASSIGN !0, $1
64 3 INIT_METHOD_CALL 'parse'
4 SEND_VAR_EX !0
5 DO_FCALL 0
65 6 INIT_METHOD_CALL 'complete'
7 DO_FCALL 0
66 8 > RETURN null
End of function execute
Function download:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: download
number of ops: 15
compiled vars: !0 = $html
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
70 0 E > INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Cfile_get_contents'
1 INIT_METHOD_CALL 'getURL'
2 DO_FCALL 0 $1
3 SEND_VAR_NO_REF_EX $1
4 DO_FCALL 0 $2
5 ASSIGN !0, $2
71 6 ROPE_INIT 3 ~6 'WebScrapingCommand%3A+Downloaded+'
7 FETCH_OBJ_R ~4 'url'
8 ROPE_ADD 1 ~6 ~6, ~4
9 ROPE_END 2 ~5 ~6, '%0A'
10 ECHO ~5
73 11 VERIFY_RETURN_TYPE !0
12 > RETURN !0
74 13* VERIFY_RETURN_TYPE
14* > RETURN null
End of function download
Function parse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: parse
number of ops: 2
compiled vars: !0 = $html
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
76 0 E > RECV !0
1 > RETURN null
End of function parse
Function complete:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: complete
number of ops: 9
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
80 0 E > ASSIGN_OBJ 'status'
1 OP_DATA 1
81 2 INIT_STATIC_METHOD_CALL 'RefactoringGuru%5CCommand%5CRealWorld%5CQueue', 'get'
3 DO_FCALL 0 $1
4 INIT_METHOD_CALL $1, 'completeCommand'
5 FETCH_THIS $2
6 SEND_VAR_EX $2
7 DO_FCALL 0
82 8 > RETURN null
End of function complete
End of class RefactoringGuru\Command\RealWorld\WebScrapingCommand.
Class RefactoringGuru\Command\RealWorld\IMDBGenresScrapingCommand:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: __construct
number of ops: 3
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
92 0 E > ASSIGN_OBJ 'url'
1 OP_DATA 'https%3A%2F%2Fwww.imdb.com%2Ffeature%2Fgenre%2F'
93 2 > RETURN null
End of function __construct
Function parse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 26
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename: /in/336C9
function name: parse
number of ops: 28
compiled vars: !0 = $html, !1 = $matches, !2 = $genre
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
99 0 E > RECV !0
101 1 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Cpreg_match_all'
2 SEND_VAL_EX '%7Chref%3D%22%28https%3A%2F%2Fwww.imdb.com%2Fsearch%2Ftitle%5C%3Fgenres%3D.%2A%3F%29%22%7C'
3 SEND_VAR_EX !0
4 SEND_VAR_EX !1
5 DO_FCALL 0
102 6 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Ccount'
7 CHECK_FUNC_ARG
8 FETCH_DIM_FUNC_ARG $4 !1, 1
9 SEND_FUNC_ARG $4
10 DO_FCALL 0 $5
11 CONCAT ~6 'IMDBGenresScrapingCommand%3A+Discovered+', $5
12 CONCAT ~7 ~6, '+genres.%0A'
13 ECHO ~7
104 14 FETCH_DIM_R ~8 !1, 1
15 > FE_RESET_R $9 ~8, ->26
16 > > FE_FETCH_R $9, !2, ->26
105 17 > INIT_STATIC_METHOD_CALL 'RefactoringGuru%5CCommand%5CRealWorld%5CQueue', 'get'
18 DO_FCALL 0 $10
19 INIT_METHOD_CALL $10, 'add'
20 NEW $11 'RefactoringGuru%5CCommand%5CRealWorld%5CIMDBGenrePageScrapingCommand'
21 SEND_VAR_EX !2
22 DO_FCALL 0
23 SEND_VAR_NO_REF_EX $11
24 DO_FCALL 0
104 25 > JMP ->16
26 > FE_FREE $9
107 27 > RETURN null
End of function parse
End of class RefactoringGuru\Command\RealWorld\IMDBGenresScrapingCommand.
Class RefactoringGuru\Command\RealWorld\IMDBGenrePageScrapingCommand:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: __construct
number of ops: 8
compiled vars: !0 = $url, !1 = $page
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
117 0 E > RECV !0
1 RECV_INIT !1 1
119 2 INIT_STATIC_METHOD_CALL
3 SEND_VAR_EX !0
4 DO_FCALL 0
120 5 ASSIGN_OBJ 'page'
6 OP_DATA !1
121 7 > RETURN null
End of function __construct
Function geturl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: getURL
number of ops: 8
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
125 0 E > FETCH_OBJ_R ~0 'url'
1 CONCAT ~1 ~0, '%3Fpage%3D'
2 FETCH_OBJ_R ~2 'page'
3 CONCAT ~3 ~1, ~2
4 VERIFY_RETURN_TYPE ~3
5 > RETURN ~3
126 6* VERIFY_RETURN_TYPE
7* > RETURN null
End of function geturl
Function parse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 28
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 28
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 47
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
Branch analysis from position: 28
filename: /in/336C9
function name: parse
number of ops: 48
compiled vars: !0 = $html, !1 = $matches, !2 = $moviePath, !3 = $url
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
132 0 E > RECV !0
134 1 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Cpreg_match_all'
2 SEND_VAL_EX '%7Chref%3D%22%28%2Ftitle%2F.%2A%3F%2F%29%5C%3Fref_%3Dadv_li_tt%22%7C'
3 SEND_VAR_EX !0
4 SEND_VAR_EX !1
5 DO_FCALL 0
135 6 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Ccount'
7 CHECK_FUNC_ARG
8 FETCH_DIM_FUNC_ARG $5 !1, 1
9 SEND_FUNC_ARG $5
10 DO_FCALL 0 $6
11 CONCAT ~7 'IMDBGenrePageScrapingCommand%3A+Discovered+', $6
12 CONCAT ~8 ~7, '+movies.%0A'
13 ECHO ~8
137 14 FETCH_DIM_R ~9 !1, 1
15 > FE_RESET_R $10 ~9, ->28
16 > > FE_FETCH_R $10, !2, ->28
138 17 > CONCAT ~11 'https%3A%2F%2Fwww.imdb.com', !2
18 ASSIGN !3, ~11
139 19 INIT_STATIC_METHOD_CALL 'RefactoringGuru%5CCommand%5CRealWorld%5CQueue', 'get'
20 DO_FCALL 0 $13
21 INIT_METHOD_CALL $13, 'add'
22 NEW $14 'RefactoringGuru%5CCommand%5CRealWorld%5CIMDBMovieScrapingCommand'
23 SEND_VAR_EX !3
24 DO_FCALL 0
25 SEND_VAR_NO_REF_EX $14
26 DO_FCALL 0
137 27 > JMP ->16
28 > FE_FREE $10
143 29 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Cpreg_match'
30 SEND_VAL_EX '%7CNext+%26%23187%3B%3C%2Fa%3E%7C'
31 SEND_VAR_EX !0
32 DO_FCALL 0 $17
33 > JMPZ $17, ->47
144 34 > INIT_STATIC_METHOD_CALL 'RefactoringGuru%5CCommand%5CRealWorld%5CQueue', 'get'
35 DO_FCALL 0 $18
36 INIT_METHOD_CALL $18, 'add'
37 NEW $19 'RefactoringGuru%5CCommand%5CRealWorld%5CIMDBGenrePageScrapingCommand'
38 CHECK_FUNC_ARG
39 FETCH_OBJ_FUNC_ARG $20 'url'
40 SEND_FUNC_ARG $20
41 FETCH_OBJ_R ~21 'page'
42 ADD ~22 ~21, 1
43 SEND_VAL_EX ~22
44 DO_FCALL 0
45 SEND_VAR_NO_REF_EX $19
46 DO_FCALL 0
146 47 > > RETURN null
End of function parse
End of class RefactoringGuru\Command\RealWorld\IMDBGenrePageScrapingCommand.
Class RefactoringGuru\Command\RealWorld\IMDBMovieScrapingCommand:
Function parse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename: /in/336C9
function name: parse
number of ops: 14
compiled vars: !0 = $html, !1 = $matches, !2 = $title
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
158 0 E > RECV !0
160 1 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Cpreg_match'
2 SEND_VAL_EX '%7C%3Ch1+itemprop%3D%22name%22+class%3D%22%22%3E%28.%2A%3F%29%3C%2Fh1%3E%7C'
3 SEND_VAR_EX !0
4 SEND_VAR_EX !1
5 DO_FCALL 0 $3
6 > JMPZ $3, ->9
161 7 > FETCH_DIM_R ~4 !1, 1
8 ASSIGN !2, ~4
163 9 > ROPE_INIT 3 ~7 'IMDBMovieScrapingCommand%3A+Parsed+movie+'
10 ROPE_ADD 1 ~7 ~7, !2
11 ROPE_END 2 ~6 ~7, '.%0A'
12 ECHO ~6
164 13 > RETURN null
End of function parse
End of class RefactoringGuru\Command\RealWorld\IMDBMovieScrapingCommand.
Class RefactoringGuru\Command\RealWorld\Queue:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: __construct
number of ops: 14
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
184 0 E > NEW $1 'SQLite3'
1 SEND_VAL_EX '%2Fin%2Fcommands.sqlite'
185 2 FETCH_CONSTANT ~2 'RefactoringGuru%5CCommand%5CRealWorld%5CSQLITE3_OPEN_CREATE'
3 FETCH_CONSTANT ~3 'RefactoringGuru%5CCommand%5CRealWorld%5CSQLITE3_OPEN_READWRITE'
4 BW_OR ~4 ~2, ~3
5 SEND_VAL_EX ~4
184 6 DO_FCALL 0
7 ASSIGN_OBJ 'db'
185 8 OP_DATA $1
187 9 FETCH_OBJ_R ~6 'db'
10 INIT_METHOD_CALL ~6, 'query'
11 SEND_VAL_EX 'CREATE+TABLE+IF+NOT+EXISTS+%22commands%22+%28%0A++++++++++++%22id%22+INTEGER+PRIMARY+KEY+AUTO_INCREMENT+NOT+NULL%2C%0A++++++++++++%22command%22+TEXT%2C%0A++++++++++++%22status%22+INTEGER%0A++++++++%29'
12 DO_FCALL 0
192 13 > RETURN null
End of function __construct
Function isempty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: isEmpty
number of ops: 10
compiled vars: !0 = $query
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
196 0 E > ASSIGN !0, 'SELECT+COUNT%28%22id%22%29+FROM+%22commands%22+WHERE+status+%3D+0'
198 1 FETCH_OBJ_R ~2 'db'
2 INIT_METHOD_CALL ~2, 'querySingle'
3 SEND_VAR_EX !0
4 DO_FCALL 0 $3
5 IS_IDENTICAL ~4 $3, 0
6 VERIFY_RETURN_TYPE ~4
7 > RETURN ~4
199 8* VERIFY_RETURN_TYPE
9* > RETURN null
End of function isempty
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: add
number of ops: 26
compiled vars: !0 = $command, !1 = $query, !2 = $statement
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
201 0 E > RECV !0
203 1 ASSIGN !1, 'INSERT+INTO+commands+%28command%2C+status%29+VALUES+%28%3Acommand%2C+%3Astatus%29'
204 2 FETCH_OBJ_R ~4 'db'
3 INIT_METHOD_CALL ~4, 'prepare'
4 SEND_VAR_EX !1
5 DO_FCALL 0 $5
6 ASSIGN !2, $5
205 7 INIT_METHOD_CALL !2, 'bindValue'
8 SEND_VAL_EX '%3Acommand'
9 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Cbase64_encode'
10 INIT_NS_FCALL_BY_NAME 'RefactoringGuru%5CCommand%5CRealWorld%5Cserialize'
11 SEND_VAR_EX !0
12 DO_FCALL 0 $7
13 SEND_VAR_NO_REF_EX $7
14 DO_FCALL 0 $8
15 SEND_VAR_NO_REF_EX $8
16 DO_FCALL 0
206 17 INIT_METHOD_CALL !2, 'bindValue'
18 SEND_VAL_EX '%3Astatus'
19 INIT_METHOD_CALL !0, 'getStatus'
20 DO_FCALL 0 $10
21 SEND_VAR_NO_REF_EX $10
22 DO_FCALL 0
207 23 INIT_METHOD_CALL !2, 'execute'
24 DO_FCALL 0
208 25 > RETURN null
End of function add
Function getcommand:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/336C9
function name: getCommand
number of ops: 23
compiled vars: !0 = $query, !1 = $record, !2 = $command
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
212 0 E > ASSIGN !0, 'SELECT+%2A+FROM+%22commands%22+WHERE+%22status%22+%3D+0+LIMIT+1'
213 1 FETCH_OBJ_R ~4 'db'
2 INIT_METHOD_CALL ~4, 'querySingle'
3 SEND_VAR_EX !0
4 SEND_VAL_EX <true>
5 DO_FCALL 0 $5
6 ASSIGN !Generated using Vulcan Logic Dumper, using php 8.0.0