3v4l.org

run code in 300+ PHP versions simultaneously
<?php // without OB echo 'before_ob' . PHP_EOL; ob_start(); // first level begins // this line will be in $second echo 'second_ob' . PHP_EOL; ob_start(); // second level begins // these 2 lines will be in $first echo 'third_ob' . PHP_EOL; echo '------' . PHP_EOL; $first = ob_get_clean() . 1; // this line will be in second // but w/o previous 2 lines echo '------' . PHP_EOL; $second = ob_get_clean() . 2; // this will output $first consisting of 2 lines. // and $second without them. var_dump($second,$first);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3CNZC
function name:  (null)
number of ops:  22
compiled vars:  !0 = $first, !1 = $second
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'before_ob%0A'
    4     1        INIT_FCALL                                               'ob_start'
          2        DO_ICALL                                                 
    6     3        ECHO                                                     'second_ob%0A'
    7     4        INIT_FCALL                                               'ob_start'
          5        DO_ICALL                                                 
    9     6        ECHO                                                     'third_ob%0A'
   10     7        ECHO                                                     '------%0A'
   11     8        INIT_FCALL                                               'ob_get_clean'
          9        DO_ICALL                                         $4      
         10        CONCAT                                           ~5      $4, '1'
         11        ASSIGN                                                   !0, ~5
   14    12        ECHO                                                     '------%0A'
   15    13        INIT_FCALL                                               'ob_get_clean'
         14        DO_ICALL                                         $7      
         15        CONCAT                                           ~8      $7, '2'
         16        ASSIGN                                                   !1, ~8
   18    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154 ms | 1395 KiB | 19 Q