3v4l.org

run code in 300+ PHP versions simultaneously
<?php function callback($buffer) { // replace all the apples with oranges return (str_replace("apples", "oranges", $buffer)); } ob_start("callback"); ?> <html> <body> <p>It's like comparing apples to oranges.</p> </body> </html> <?php ob_end_flush(); function callback2($buffer) { // replace all the apples with oranges return (str_replace("apples", "oranges", $buffer)); } ob_start(null); ?> <html> <body> <p>It's like comparing apples to oranges.</p> </body> </html> <?php ob_end_flush(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/32h32
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'ob_start'
          1        SEND_VAL                                                 'callback'
          2        DO_ICALL                                                 
   12     3        ECHO                                                     '%3Chtml%3E%0A%3Cbody%3E%0A%3Cp%3EIt%27s+like+comparing+apples+to+oranges.%3C%2Fp%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A'
   19     4        INIT_FCALL                                               'ob_end_flush'
          5        DO_ICALL                                                 
   27     6        INIT_FCALL                                               'ob_start'
          7        SEND_VAL                                                 null
          8        DO_ICALL                                                 
   30     9        ECHO                                                     '%3Chtml%3E%0A%3Cbody%3E%0A%3Cp%3EIt%27s+like+comparing+apples+to+oranges.%3C%2Fp%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A'
   37    10        INIT_FCALL                                               'ob_end_flush'
         11        DO_ICALL                                                 
   38    12      > RETURN                                                   1

Function callback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/32h32
function name:  callback
number of ops:  8
compiled vars:  !0 = $buffer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'apples'
          3        SEND_VAL                                                 'oranges'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    7     7*     > RETURN                                                   null

End of function callback

Function callback2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/32h32
function name:  callback2
number of ops:  8
compiled vars:  !0 = $buffer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   24     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'apples'
          3        SEND_VAL                                                 'oranges'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   25     7*     > RETURN                                                   null

End of function callback2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.19 ms | 1396 KiB | 19 Q