3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function getName() { return 'Bob'; } } $object = new Foo; echo "This is the value of the var named by the return value of \$object->getName(): {${$object->getName()}}";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lu1CM
function name:  (null)
number of ops:  10
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        NOP                                                      
          4        INIT_METHOD_CALL                                         !0, 'getName'
          5        DO_FCALL                                      0  $4      
          6        FETCH_R                      local               ~5      $4
          7        FAST_CONCAT                                      ~6      'This+is+the+value+of+the+var+named+by+the+return+value+of+%24object-%3EgetName%28%29%3A+', ~5
          8        ECHO                                                     ~6
          9      > RETURN                                                   1

Class Foo:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lu1CM
function name:  getName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'Bob'
    8     1*     > RETURN                                                   null

End of function getname

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.21 ms | 1384 KiB | 13 Q