3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_cb( $a ) { return 'AAA' . PHP_EOL . $a . 'BBB' . PHP_EOL; } function my_cb2( $a ) { if ( $a === 'XXX' ) { return false; } if ( $a === '' ) { $a = 'EMPTY'; } return 'CCC' . PHP_EOL . $a . 'DDD' . PHP_EOL; } ob_start( 'my_cb', 0 ); ob_start( 'my_cb2', 0 ); echo "XXX"; ob_flush(); #var_dump( ob_get_status( true ) ); echo "ONE" . PHP_EOL; ob_flush(); echo "TWO" . PHP_EOL; ob_flush();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AbBH1
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'ob_start'
          1        SEND_VAL                                                 'my_cb'
          2        SEND_VAL                                                 0
          3        DO_ICALL                                                 
   20     4        INIT_FCALL                                               'ob_start'
          5        SEND_VAL                                                 'my_cb2'
          6        SEND_VAL                                                 0
          7        DO_ICALL                                                 
   22     8        ECHO                                                     'XXX'
   24     9        INIT_FCALL                                               'ob_flush'
         10        DO_ICALL                                                 
   28    11        ECHO                                                     'ONE%0A'
   30    12        INIT_FCALL                                               'ob_flush'
         13        DO_ICALL                                                 
   32    14        ECHO                                                     'TWO%0A'
   34    15        INIT_FCALL                                               'ob_flush'
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function my_cb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AbBH1
function name:  my_cb
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        CONCAT                                           ~1      'AAA%0A', !0
          2        CONCAT                                           ~2      ~1, 'BBB'
          3        CONCAT                                           ~3      ~2, '%0A'
          4      > RETURN                                                   ~3
    5     5*     > RETURN                                                   null

End of function my_cb

Function my_cb2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/AbBH1
function name:  my_cb2
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        IS_IDENTICAL                                             !0, 'XXX'
          2      > JMPZ                                                     ~1, ->4
    9     3    > > RETURN                                                   <false>
   11     4    >   IS_IDENTICAL                                             !0, ''
          5      > JMPZ                                                     ~2, ->7
   12     6    >   ASSIGN                                                   !0, 'EMPTY'
   15     7    >   CONCAT                                           ~4      'CCC%0A', !0
          8        CONCAT                                           ~5      ~4, 'DDD'
          9        CONCAT                                           ~6      ~5, '%0A'
         10      > RETURN                                                   ~6
   16    11*     > RETURN                                                   null

End of function my_cb2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.17 ms | 1016 KiB | 15 Q