3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @param mixed[] $a */ function test(array $a): void { if (isset($a['a']['b'])) { echo 'OK'; } } class Foo { } test(['a' => new Foo()]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RegCt
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'test'
          1        NEW                                              $0      'Foo'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~2      $0, 'a'
          4        SEND_VAL                                                 ~2
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/RegCt
function name:  test
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        FETCH_DIM_IS                                     ~1      !0, 'a'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'b'
          3      > JMPZ                                                     ~2, ->5
    9     4    >   ECHO                                                     'OK'
   11     5    > > RETURN                                                   null

End of function test

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.96 ms | 1432 KiB | 14 Q