3v4l.org

run code in 300+ PHP versions simultaneously
<?php include('start.php'); require_once('lib/Phirehose/Phirehose.php'); class FilterTrackConsumer extends Phirehose { public $db; public function setDB(&$db) { $this->db = $db; } public function enqueueStatus($status) { $tweets = new Tweets($this->db); $data = json_decode($status, true); $user_id = $data['user']['id']; if($user_id) { $raw_tweet = serialize($data); $tweets->insertNewTweet($user_id, $raw_tweet); } } } $sc = new FilterTrackConsumer('John_Gald', 'yjdsqgfhjkm', Phirehose::METHOD_FILTER); $sc->setDB($db); $twitterIds = $users->getTwitterIds(); $sc->setFollow($twitterIds); $sc->consume(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JhCWb
function name:  (null)
number of ops:  22
compiled vars:  !0 = $sc, !1 = $db, !2 = $twitterIds, !3 = $users
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                          'start.php', INCLUDE
    4     1        INCLUDE_OR_EVAL                                          'lib%2FPhirehose%2FPhirehose.php', REQUIRE_ONCE
    6     2        DECLARE_CLASS                                            'filtertrackconsumer', 'phirehose'
   26     3        NEW                                              $6      'FilterTrackConsumer'
          4        SEND_VAL_EX                                              'John_Gald'
          5        SEND_VAL_EX                                              'yjdsqgfhjkm'
          6        FETCH_CLASS_CONSTANT                             ~7      'Phirehose', 'METHOD_FILTER'
          7        SEND_VAL_EX                                              ~7
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $6
   28    10        INIT_METHOD_CALL                                         !0, 'setDB'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
   29    13        INIT_METHOD_CALL                                         !3, 'getTwitterIds'
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !2, $11
   30    16        INIT_METHOD_CALL                                         !0, 'setFollow'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
   31    19        INIT_METHOD_CALL                                         !0, 'consume'
         20        DO_FCALL                                      0          
   32    21      > RETURN                                                   1

Class FilterTrackConsumer:
Function setdb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JhCWb
function name:  setDB
number of ops:  4
compiled vars:  !0 = $db
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               'db'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   null

End of function setdb

Function enqueuestatus:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/JhCWb
function name:  enqueueStatus
number of ops:  25
compiled vars:  !0 = $status, !1 = $tweets, !2 = $data, !3 = $user_id, !4 = $raw_tweet
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        NEW                                              $5      'Tweets'
          2        CHECK_FUNC_ARG                                           
          3        FETCH_OBJ_FUNC_ARG                               $6      'db'
          4        SEND_FUNC_ARG                                            $6
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   15     7        INIT_FCALL                                               'json_decode'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
   17    12        FETCH_DIM_R                                      ~11     !2, 'user'
         13        FETCH_DIM_R                                      ~12     ~11, 'id'
         14        ASSIGN                                                   !3, ~12
   18    15      > JMPZ                                                     !3, ->24
   19    16    >   INIT_FCALL                                               'serialize'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !4, $14
   20    20        INIT_METHOD_CALL                                         !1, 'insertNewTweet'
         21        SEND_VAR_EX                                              !3
         22        SEND_VAR_EX                                              !4
         23        DO_FCALL                                      0          
   22    24    > > RETURN                                                   null

End of function enqueuestatus

End of class FilterTrackConsumer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.01 ms | 1400 KiB | 17 Q