3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function hello ($arg) { return strlen($arg); } } $a = array('b' => array(new Test(), 'hello')); echo $a['b']('123');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZHfs
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
          3        ADD_ARRAY_ELEMENT                                ~3      'hello'
          4        INIT_ARRAY                                       ~4      ~3, 'b'
          5        ASSIGN                                                   !0, ~4
   11     6        FETCH_DIM_R                                      ~6      !0, 'b'
          7        INIT_DYNAMIC_CALL                                        ~6
          8        SEND_VAL_EX                                              '123'
          9        DO_FCALL                                      0  $7      
         10        ECHO                                                     $7
         11      > RETURN                                                   1

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

End of function hello

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.07 ms | 1394 KiB | 13 Q