3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $test = "test"; } function output($buffer) { //global $object; $object = new a(); $object->bar = "a"; 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/eXVIO
function name:  (null)
number of ops:  10
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        ASSIGN_OBJ                                               !0, 'bar'
          4        OP_DATA                                                  'a'
   18     5        INIT_FCALL                                               'ob_start'
          6        SEND_VAL                                                 'output'
          7        DO_ICALL                                                 
   20     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/eXVIO
function name:  output
number of ops:  10
compiled vars:  !0 = $buffer, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   11     1        NEW                                              $2      'a'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $2
   12     4        ASSIGN_OBJ                                               !1, 'bar'
          5        OP_DATA                                                  'a'
   13     6        FETCH_OBJ_R                                      ~6      !1, 'bar'
          7        CONCAT                                           ~7      !0, ~6
          8      > RETURN                                                   ~7
   14     9*     > RETURN                                                   null

End of function output

Class a: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.8 ms | 1395 KiB | 15 Q