3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $test = "test"; } function output($buffer) { global $object; return $buffer.$object->bar; } $object = new a(); $object->bar = "a"; ob_start('output'); echo "foo ";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E6iFl
function name:  (null)
number of ops:  10
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        ASSIGN_OBJ                                               !0, 'bar'
          4        OP_DATA                                                  'a'
   16     5        INIT_FCALL                                               'ob_start'
          6        SEND_VAL                                                 'output'
          7        DO_ICALL                                                 
   18     8        ECHO                                                     'foo+'
          9      > RETURN                                                   1

Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E6iFl
function name:  output
number of ops:  6
compiled vars:  !0 = $buffer, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        BIND_GLOBAL                                              !1, 'object'
   11     2        FETCH_OBJ_R                                      ~2      !1, 'bar'
          3        CONCAT                                           ~3      !0, ~2
          4      > RETURN                                                   ~3
   12     5*     > RETURN                                                   null

End of function output

Class a: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148 ms | 1395 KiB | 15 Q