3v4l.org

run code in 300+ PHP versions simultaneously
<?php function outside() { $a = array( '1' => 'one', '2' => 'two' ); $c = 100; $o = ''; while ( --$c ) { $o .= strtr( $c, $a ); } return $o; } function inside() { $c = 100; $o = ''; while ( --$c ) { $b = array( '1' => 'one', '2' => 'two' ); $o .= strtr( $c, $b ); } return $o; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YINZA
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E > > RETURN                                                   1

Function outside:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
Branch analysis from position: 4
filename:       /in/YINZA
function name:  outside
number of ops:  13
compiled vars:  !0 = $a, !1 = $c, !2 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 100
    6     2        ASSIGN                                                   !2, ''
    8     3      > JMP                                                      ->9
    9     4    >   INIT_FCALL                                               'strtr'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ASSIGN_OP                                     8          !2, $6
    8     9    >   PRE_DEC                                          ~8      !1
         10      > JMPNZ                                                    ~8, ->4
   12    11    > > RETURN                                                   !2
   13    12*     > RETURN                                                   null

End of function outside

Function inside:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/YINZA
function name:  inside
number of ops:  13
compiled vars:  !0 = $c, !1 = $o, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 100
   17     1        ASSIGN                                                   !1, ''
   19     2      > JMP                                                      ->9
   20     3    >   ASSIGN                                                   !2, <array>
   21     4        INIT_FCALL                                               'strtr'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8        ASSIGN_OP                                     8          !1, $6
   19     9    >   PRE_DEC                                          ~8      !0
         10      > JMPNZ                                                    ~8, ->3
   24    11    > > RETURN                                                   !1
   25    12*     > RETURN                                                   null

End of function inside

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.85 ms | 1016 KiB | 14 Q