3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Rowset implements Serializable { /** * @var array */ private $_results; public function __construct(array $results) { $this->_results = $results; } public function serialize() { return serialize($this->_results); } public function unserialize($serialized_data) { $this->_results = unserialize($serialized_data); } } class Item { const ITEM_TYPE_IMAGE = 'image'; const ITEM_TYPE_VIDEO = 'video'; /** * @var string */ protected $_service_name; /** * @var string */ protected $_item_id; /** * @var string */ protected $_item_url; /** * @var string */ protected $_user_id; /** * @var string */ protected $_text; /** * @var string */ protected $_post_url; /** * @var string */ protected $_item_type; /** * @var string */ protected $_datetime; /** * @param string $user_id * @return $this */ public function setUserId($user_id) { $this->_user_id = $user_id; return $this; } /** * @return string */ public function getUserId() { return $this->_user_id; } /** * @param string $datetime * @return $this */ public function setDatetime($datetime) { $this->_datetime = $datetime; return $this; } /** * @return string */ public function getDatetime() { return $this->_datetime; } /** * @param string $item_id * @return $this */ public function setItemId($item_id) { $this->_item_id = $item_id; return $this; } /** * @return string */ public function getItemId() { return $this->_item_id; } /** * @param string $item_type * @return $this */ public function setItemType($item_type) { $this->_item_type = $item_type; return $this; } /** * @return string */ public function getItemType() { return $this->_item_type; } /** * @param string $item_url * @return $this */ public function setItemUrl($item_url) { $this->_item_url = $item_url; return $this; } /** * @return string */ public function getItemUrl() { return $this->_item_url; } /** * @param string $post_url * @return $this */ public function setPostUrl($post_url) { $this->_post_url = $post_url; return $this; } /** * @return string */ public function getPostUrl() { return $this->_post_url; } /** * @return string */ public function getServiceName() { return $this->_service_name; } /** * @param string $text * @return $this */ public function setText($text) { $this->_text = $text; } /** * @return string */ public function getText() { return $this->_text; } } $item = new Item(); $item->setText('yoyo'); $rowset = new Rowset(array($item)); echo serialize($rowset);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $item, !1 = $rowset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'rowset'
  206     1        NEW                                              $2      'Item'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
  207     4        INIT_METHOD_CALL                                         !0, 'setText'
          5        SEND_VAL_EX                                              'yoyo'
          6        DO_FCALL                                      0          
  209     7        NEW                                              $6      'Rowset'
          8        INIT_ARRAY                                       ~7      !0
          9        SEND_VAL_EX                                              ~7
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $6
  211    12        INIT_FCALL                                               'serialize'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $10     
         15        ECHO                                                     $10
         16      > RETURN                                                   1

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

End of function __construct

Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  serialize
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_OBJ_R                                      ~0      '_results'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   18     5*     > RETURN                                                   null

End of function serialize

Function unserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  unserialize
number of ops:  7
compiled vars:  !0 = $serialized_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN_OBJ                                               '_results'
          5        OP_DATA                                                  $2
   23     6      > RETURN                                                   null

End of function unserialize

End of class Rowset.

Class Item:
Function setuserid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  setUserId
number of ops:  6
compiled vars:  !0 = $user_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   RECV                                             !0      
   78     1        ASSIGN_OBJ                                               '_user_id'
          2        OP_DATA                                                  !0
   79     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   80     5*     > RETURN                                                   null

End of function setuserid

Function getuserid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getUserId
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   87     0  E >   FETCH_OBJ_R                                      ~0      '_user_id'
          1      > RETURN                                                   ~0
   88     2*     > RETURN                                                   null

End of function getuserid

Function setdatetime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  setDatetime
number of ops:  6
compiled vars:  !0 = $datetime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   94     0  E >   RECV                                             !0      
   96     1        ASSIGN_OBJ                                               '_datetime'
          2        OP_DATA                                                  !0
   97     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   98     5*     > RETURN                                                   null

End of function setdatetime

Function getdatetime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getDatetime
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  105     0  E >   FETCH_OBJ_R                                      ~0      '_datetime'
          1      > RETURN                                                   ~0
  106     2*     > RETURN                                                   null

End of function getdatetime

Function setitemid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  setItemId
number of ops:  6
compiled vars:  !0 = $item_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  112     0  E >   RECV                                             !0      
  114     1        ASSIGN_OBJ                                               '_item_id'
          2        OP_DATA                                                  !0
  115     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  116     5*     > RETURN                                                   null

End of function setitemid

Function getitemid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getItemId
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  123     0  E >   FETCH_OBJ_R                                      ~0      '_item_id'
          1      > RETURN                                                   ~0
  124     2*     > RETURN                                                   null

End of function getitemid

Function setitemtype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  setItemType
number of ops:  6
compiled vars:  !0 = $item_type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  130     0  E >   RECV                                             !0      
  132     1        ASSIGN_OBJ                                               '_item_type'
          2        OP_DATA                                                  !0
  133     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  134     5*     > RETURN                                                   null

End of function setitemtype

Function getitemtype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getItemType
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  141     0  E >   FETCH_OBJ_R                                      ~0      '_item_type'
          1      > RETURN                                                   ~0
  142     2*     > RETURN                                                   null

End of function getitemtype

Function setitemurl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  setItemUrl
number of ops:  6
compiled vars:  !0 = $item_url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  148     0  E >   RECV                                             !0      
  150     1        ASSIGN_OBJ                                               '_item_url'
          2        OP_DATA                                                  !0
  151     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  152     5*     > RETURN                                                   null

End of function setitemurl

Function getitemurl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getItemUrl
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  159     0  E >   FETCH_OBJ_R                                      ~0      '_item_url'
          1      > RETURN                                                   ~0
  160     2*     > RETURN                                                   null

End of function getitemurl

Function setposturl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  setPostUrl
number of ops:  6
compiled vars:  !0 = $post_url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  166     0  E >   RECV                                             !0      
  168     1        ASSIGN_OBJ                                               '_post_url'
          2        OP_DATA                                                  !0
  169     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  170     5*     > RETURN                                                   null

End of function setposturl

Function getposturl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getPostUrl
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  177     0  E >   FETCH_OBJ_R                                      ~0      '_post_url'
          1      > RETURN                                                   ~0
  178     2*     > RETURN                                                   null

End of function getposturl

Function getservicename:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getServiceName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  185     0  E >   FETCH_OBJ_R                                      ~0      '_service_name'
          1      > RETURN                                                   ~0
  186     2*     > RETURN                                                   null

End of function getservicename

Function settext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  setText
number of ops:  4
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  192     0  E >   RECV                                             !0      
  194     1        ASSIGN_OBJ                                               '_text'
          2        OP_DATA                                                  !0
  195     3      > RETURN                                                   null

End of function settext

Function gettext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOHSI
function name:  getText
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  202     0  E >   FETCH_OBJ_R                                      ~0      '_text'
          1      > RETURN                                                   ~0
  203     2*     > RETURN                                                   null

End of function gettext

End of class Item.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.73 ms | 1408 KiB | 17 Q