3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Obj { } function callback($content) { return isset($GLOBALS['a']) ? $content : 'oops'; } ob_start('callback'); $a = new Obj(); //$b = $a; echo 'okay'; //ob_end_flush();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FBik9
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'ob_start'
          1        SEND_VAL                                                 'callback'
          2        DO_ICALL                                                 
   12     3        NEW                                              $2      'Obj'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   14     6        ECHO                                                     'okay'
   15     7      > RETURN                                                   1

Function callback:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FBik9
function name:  callback
number of ops:  9
compiled vars:  !0 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        FETCH_IS                                         ~1      'GLOBALS'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'a'
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      'oops'
          7    > > RETURN                                                   ~3
    9     8*     > RETURN                                                   null

End of function callback

Class Obj: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.57 ms | 1395 KiB | 15 Q