3v4l.org

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

Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qd1vR
function name:  output
number of ops:  12
compiled vars:  !0 = $buffer, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        BIND_GLOBAL                                              !1, 'object'
   18     2        INIT_FCALL                                               'ob_end_flush'
          3        SEND_VAL                                                 'output'
          4        DO_ICALL                                                 
   19     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   20     8        FETCH_OBJ_R                                      ~4      !1, 'test'
          9        CONCAT                                           ~5      !0, ~4
         10      > RETURN                                                   ~5
   21    11*     > RETURN                                                   null

End of function output

Class a:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qd1vR
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'destruct+a'
   10     1      > RETURN                                                   null

End of function __destruct

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.55 ms | 1395 KiB | 19 Q