3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $baz = 'beer'; function bar($arg) { return $this->baz . ' ' . $arg; } } $foo = new Foo(); $callable = array($foo, 'bar'); var_dump($callable('soda'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/snPDv
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo, !1 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        INIT_ARRAY                                       ~5      !0
          4        ADD_ARRAY_ELEMENT                                ~5      'bar'
          5        ASSIGN                                                   !1, ~5
   12     6        INIT_FCALL                                               'var_dump'
          7        INIT_DYNAMIC_CALL                                        !1
          8        SEND_VAL_EX                                              'soda'
          9        DO_FCALL                                      0  $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.8 ms | 1395 KiB | 15 Q