3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function getName() { return 'Bob'; } } $object = new Foo; $Bob = "Dave"; 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/ToX5l
function name:  (null)
number of ops:  10
compiled vars:  !0 = $object, !1 = $Bob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        ASSIGN                                                   !1, 'Dave'
   14     4        NOP                                                      
          5        INIT_METHOD_CALL                                         !0, 'getName'
          6        DO_FCALL                                      0  $6      
          7        FAST_CONCAT                                      ~7      'This+is+the+value+of+the+var+named+by+the+return+value+of+%24object-%3EgetName%28%29%3A+', $6
          8        ECHO                                                     ~7
          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/ToX5l
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:
160.07 ms | 1393 KiB | 13 Q