3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; for ($i=0; $i<10; $i++){ echo $i." : ".strlen($i)."\n"; if ($i==5){ function strlen($x){return "hello";} } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 2
Branch analysis from position: 15
Branch analysis from position: 2
Branch analysis from position: 12
filename:       /in/QSFC8
function name:  (null)
number of ops:  16
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->13
    6     2    >   CONCAT                                           ~2      !0, '+%3A+'
          3        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cstrlen'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        CONCAT                                           ~4      ~2, $3
          7        CONCAT                                           ~5      ~4, '%0A'
          8        ECHO                                                     ~5
    8     9        IS_EQUAL                                                 !0, 5
         10      > JMPZ                                                     ~6, ->12
    9    11    >   DECLARE_FUNCTION                                         'foo%5Cstrlen'
    5    12    >   PRE_INC                                                  !0
         13    >   IS_SMALLER                                               !0, 10
         14      > JMPNZ                                                    ~8, ->2
   11    15    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QSFC8
function name:  Foo\strlen
number of ops:  3
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1      > RETURN                                                   'hello'
          2*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.97 ms | 997 KiB | 14 Q