3v4l.org

run code in 300+ PHP versions simultaneously
<?php class template { public function __invoke( $file = '', $echo = true ){ ob_start( array ($this, 'clean') ); echo ($file ? $file : 'Texto que no serĂ¡ mostrado.'); $buffer = ob_get_clean( ); if ( $echo ) echo $buffer; else return $buffer; } private function clean( $buffer ) { return str_replace('mostrado', 'ARATAT', $buffer); } } $html = new template; $html('Texto que no serĂ¡ mostrado.dddddddddddddd');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u1f8j
function name:  (null)
number of ops:  7
compiled vars:  !0 = $html
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'template'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              'Texto+que+no+ser%C3%A1+mostrado.dddddddddddddd'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class template:
Function __invoke:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
Branch analysis from position: 19
filename:       /in/u1f8j
function name:  __invoke
number of ops:  21
compiled vars:  !0 = $file, !1 = $echo, !2 = $buffer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      ''
          1        RECV_INIT                                        !1      <true>
    5     2        INIT_FCALL                                               'ob_start'
          3        FETCH_THIS                                       ~3      
          4        INIT_ARRAY                                       ~4      ~3
          5        ADD_ARRAY_ELEMENT                                ~4      'clean'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
    6     8      > JMPZ                                                     !0, ->11
          9    >   QM_ASSIGN                                        ~6      !0
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~6      'Texto+que+no+ser%C3%A1+mostrado.'
         12    >   ECHO                                                     ~6
    7    13        INIT_FCALL                                               'ob_get_clean'
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !2, $7
    8    16      > JMPZ                                                     !1, ->19
         17    >   ECHO                                                     !2
         18      > JMP                                                      ->20
         19    > > RETURN                                                   !2
         20    > > RETURN                                                   null

End of function __invoke

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

End of function clean

End of class template.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.41 ms | 1400 KiB | 19 Q