3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($tring, $string2){ return $tring . $string2; } $obj = new stdClass(); $obj->bean = array(); $das = array('function' => 'teste'); $functions[] = $das; $obj->bean = $das; var_dump($obj); echo $obj->bean['function']("Lucas","Oliveira");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E3RJu
function name:  (null)
number of ops:  21
compiled vars:  !0 = $obj, !1 = $das, !2 = $functions
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    9     3        ASSIGN_OBJ                                               !0, 'bean'
          4        OP_DATA                                                  <array>
   11     5        ASSIGN                                                   !1, <array>
   13     6        ASSIGN_DIM                                               !2
          7        OP_DATA                                                  !1
   15     8        ASSIGN_OBJ                                               !0, 'bean'
          9        OP_DATA                                                  !1
   17    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   19    13        FETCH_OBJ_R                                      ~11     !0, 'bean'
         14        FETCH_DIM_R                                      ~12     ~11, 'function'
         15        INIT_DYNAMIC_CALL                                        ~12
         16        SEND_VAL_EX                                              'Lucas'
         17        SEND_VAL_EX                                              'Oliveira'
         18        DO_FCALL                                      0  $13     
         19        ECHO                                                     $13
         20      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E3RJu
function name:  test
number of ops:  5
compiled vars:  !0 = $tring, !1 = $string2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        CONCAT                                           ~2      !0, !1
          3      > RETURN                                                   ~2
    5     4*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.71 ms | 1395 KiB | 15 Q