3v4l.org

run code in 300+ PHP versions simultaneously
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 30
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 30
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/6GTKb
function name:  (null)
number of ops:  32
compiled vars:  !0 = $method, !1 = $john
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                            'user'
   93     1      > FE_RESET_R                                       $2      <array>, ->30
          2    > > FE_FETCH_R                                               $2, !0, ->30
   94     3    >   INIT_STATIC_METHOD_CALL                                  'ObjectCache', 'init'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   95     6        ROPE_INIT                                     3  ~5      'Method%3A+'
          7        ROPE_ADD                                      1  ~5      ~5, !0
          8        ROPE_END                                      2  ~4      ~5, '%0A'
          9        ECHO                                                     ~4
   96    10        NEW                                              $7      'User'
         11        SEND_VAL_EX                                              'John'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !1, $7
   97    14        INIT_STATIC_METHOD_CALL                                  'ObjectCache', 'add'
         15        SEND_VAR                                                 !1
         16        DO_FCALL                                      0          
   98    17        INIT_STATIC_METHOD_CALL                                  'ObjectCache', 'add'
         18        INIT_FCALL                                               'loadfromdb'
         19        DO_FCALL                                      0  $11     
         20        SEND_VAR                                                 $11
         21        DO_FCALL                                      0          
   99    22        INIT_FCALL                                               'mergeusers'
         23        DO_FCALL                                      0          
  100    24        INIT_FCALL                                               'print_r'
         25        INIT_STATIC_METHOD_CALL                                  'ObjectCache', 'getCache'
         26        DO_FCALL                                      0  $14     
         27        SEND_VAR                                                 $14
         28        DO_ICALL                                                 
   93    29      > JMP                                                      ->2
         30    >   FE_FREE                                                  $2
  101    31      > RETURN                                                   1

Function mergeusers:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 21
Branch analysis from position: 12
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/6GTKb
function name:  mergeUsers
number of ops:  27
compiled vars:  !0 = $users, !1 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   ASSIGN                                                   !0, <array>
   32     1        INIT_STATIC_METHOD_CALL                                  'ObjectCache', 'getCache'
          2        DO_FCALL                                      0  $3      
          3      > FE_RESET_R                                       $4      $3, ->22
          4    > > FE_FETCH_R                                               $4, !1, ->22
   33     5    >   FETCH_OBJ_R                                      ~5      !1, 'name'
          6        ARRAY_KEY_EXISTS                                 ~6      ~5, !0
          7        BOOL_NOT                                         ~7      ~6
          8      > JMPZ                                                     ~7, ->12
   34     9    >   FETCH_OBJ_R                                      ~8      !1, 'name'
         10        ASSIGN_DIM                                               !0, ~8
         11        OP_DATA                                                  !1
   36    12    >   FETCH_OBJ_R                                      ~10     !1, 'name'
         13        FETCH_DIM_R                                      ~11     !0, ~10
         14        IS_NOT_IDENTICAL                                         !1, ~11
         15      > JMPZ                                                     ~12, ->21
   37    16    >   FETCH_OBJ_R                                      ~13     !1, 'name'
         17        FETCH_DIM_R                                      ~14     !0, ~13
         18        INIT_METHOD_CALL                                         ~14, 'mergeTransactions'
         19        SEND_VAR_EX                                              !1
         20        DO_FCALL                                      0          
   32    21    > > JMP                                                      ->4
         22    >   FE_FREE                                                  $4
   40    23        INIT_STATIC_METHOD_CALL                                  'ObjectCache', 'set'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0          
   41    26      > RETURN                                                   null

End of function mergeusers

Function loadfromdb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  loadFromDB
number of ops:  27
compiled vars:  !0 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   87     0  E >   NEW                                              $1      'User'
          1        SEND_VAL_EX                                              'John'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   88     4        INIT_METHOD_CALL                                         !0, 'addTransaction'
          5        NEW                                              $4      'Transaction'
          6        SEND_VAL_EX                                              100
          7        SEND_VAL_EX                                              'credit'
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $4
         10        DO_FCALL                                      0          
   89    11        INIT_METHOD_CALL                                         !0, 'addTransaction'
         12        NEW                                              $7      'Transaction'
         13        SEND_VAL_EX                                              500
         14        SEND_VAL_EX                                              'credit'
         15        DO_FCALL                                      0          
         16        SEND_VAR_NO_REF_EX                                       $7
         17        DO_FCALL                                      0          
   90    18        INIT_METHOD_CALL                                         !0, 'addTransaction'
         19        NEW                                              $10     'Transaction'
         20        SEND_VAL_EX                                              250
         21        SEND_VAL_EX                                              'credit'
         22        DO_FCALL                                      0          
         23        SEND_VAR_NO_REF_EX                                       $10
         24        DO_FCALL                                      0          
   91    25      > RETURN                                                   !0
   92    26*     > RETURN                                                   null

End of function loadfromdb

Class Equalable:
Function equal:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  equal
number of ops:  3
compiled vars:  !0 = $otherUser
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        VERIFY_RETURN_TYPE                                       
          2      > RETURN                                                   null

End of function equal

End of class Equalable.

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

End of function __construct

End of class Transaction.

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

End of function __construct

Function equal:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  equal
number of ops:  8
compiled vars:  !0 = $otherUser
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_OBJ_R                                      ~1      !0, 'name'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4        VERIFY_RETURN_TYPE                                       ~3
          5      > RETURN                                                   ~3
   19     6*       VERIFY_RETURN_TYPE                                       
          7*     > RETURN                                                   null

End of function equal

Function mergetransactions:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  mergeTransactions
number of ops:  10
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        INIT_FCALL                                               'array_merge'
          2        FETCH_OBJ_R                                      ~2      'transactions'
          3        SEND_VAL                                                 ~2
          4        FETCH_OBJ_R                                      ~3      !0, 'transactions'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                         $4      
          7        ASSIGN_OBJ                                               'transactions'
          8        OP_DATA                                                  $4
   22     9      > RETURN                                                   null

End of function mergetransactions

Function addtransaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  addTransaction
number of ops:  5
compiled vars:  !0 = $transaction
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   24     1        FETCH_OBJ_W                                      $1      'transactions'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   25     4      > RETURN                                                   null

End of function addtransaction

Function gettransactions:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  getTransactions
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   FETCH_OBJ_R                                      ~0      'transactions'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   28     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function gettransactions

End of class User.

Class ObjectCache:
Function getcache:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  getCache
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'objects'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   47     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function getcache

Function add:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 38
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 38
Branch analysis from position: 12
4 jumps found. (Code = 188) Position 1 = 19, Position 2 = 26, Position 3 = 36, Position 4 = 14
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 36
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 26
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 26
Branch analysis from position: 19
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/6GTKb
function name:  add
number of ops:  40
compiled vars:  !0 = $eq, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   RECV                                             !0      
   49     1        FETCH_STATIC_PROP_R          global lock         ~2      'objects'
          2        COUNT                                            ~3      ~2
          3        IS_IDENTICAL                                             ~3, 0
          4      > JMPZ                                                     ~4, ->9
   50     5    >   FETCH_STATIC_PROP_W          unknown             $5      'objects'
          6        ASSIGN_DIM                                               $5
          7        OP_DATA                                                  !0
   51     8      > RETURN                                                   null
   53     9    >   FETCH_STATIC_PROP_R          unknown             ~7      'objects'
         10      > FE_RESET_R                                       $8      ~7, ->38
         11    > > FE_FETCH_R                                               $8, !1, ->38
   54    12    >   FETCH_STATIC_PROP_R          unknown             ~9      'method'
         13      > SWITCH_STRING                                            ~9, [ 'built-in':->19, 'op-overload':->26, ], ->36
   55    14    >   CASE                                                     ~9, 'built-in'
         15      > JMPNZ                                                    ~10, ->19
   61    16    >   CASE                                                     ~9, 'op-overload'
         17      > JMPNZ                                                    ~10, ->26
         18    > > JMP                                                      ->36
   56    19    >   IS_NOT_EQUAL                                             !0, !1
         20      > JMPZ                                                     ~11, ->25
   57    21    >   FETCH_STATIC_PROP_W          unknown             $12     'objects'
         22        ASSIGN_DIM                                               $12
         23        OP_DATA                                                  !0
   58    24      > JMP                                                      ->36
   60    25    > > JMP                                                      ->36
   63    26    >   INIT_METHOD_CALL                                         !0, 'equal'
         27        SEND_VAR_EX                                              !1
         28        DO_FCALL                                      0  $14     
         29        BOOL_NOT                                         ~15     $14
         30      > JMPZ                                                     ~15, ->35
   64    31    >   FETCH_STATIC_PROP_W          unknown             $16     'objects'
         32        ASSIGN_DIM                                               $16
         33        OP_DATA                                                  !1
   65    34      > JMP                                                      ->36
   67    35    > > JMP                                                      ->36
         36    >   FREE                                                     ~9
   53    37      > JMP                                                      ->11
         38    >   FE_FREE                                                  $8
   70    39      > RETURN                                                   null

End of function add

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  set
number of ops:  4
compiled vars:  !0 = $objects
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   71     0  E >   RECV                                             !0      
   72     1        ASSIGN_STATIC_PROP                                       'objects'
          2        OP_DATA                                                  !0
   73     3      > RETURN                                                   null

End of function set

Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  init
number of ops:  6
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   74     0  E >   RECV                                             !0      
   75     1        ASSIGN_STATIC_PROP                                       'method'
          2        OP_DATA                                                  !0
   76     3        ASSIGN_STATIC_PROP                                       'objects'
          4        OP_DATA                                                  <array>
   77     5      > RETURN                                                   null

End of function init

Function search:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6GTKb
function name:  search
number of ops:  24
compiled vars:  !0 = $prop, !1 = $value, !2 = $values, !3 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   78     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   79     2        INIT_FCALL                                               'array_column'
          3        FETCH_STATIC_PROP_R          global lock         ~4      'objects'
          4        SEND_VAL                                                 ~4
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
   80     8        INIT_FCALL                                               'array_search'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !3, $7
   81    13        TYPE_CHECK                                  1018          !3
         14      > JMPZ                                                     ~9, ->19
   82    15    >   FETCH_STATIC_PROP_R          unknown             ~10     'objects'
         16        FETCH_DIM_R                                      ~11     ~10, !3
         17        QM_ASSIGN                                        ~12     ~11
         18      > JMP                                                      ->20
   83    19    >   QM_ASSIGN                                        ~12     null
         20    >   VERIFY_RETURN_TYPE                                       ~12
         21      > RETURN                                                   ~12
   84    22*       VERIFY_RETURN_TYPE                                       
         23*     > RETURN                                                   null

End of function search

End of class ObjectCache.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.67 ms | 999 KiB | 19 Q