3v4l.org

run code in 300+ PHP versions simultaneously
<?php function tpl(?array $items) { if (empty($items)) { echo "No Results" . "\n"; } else foreach ($items as $result) { echo "Result: " . $result . "\n"; } } tpl(null); tpl([1, 2, 3]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/88DJ3
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'tpl'
          1        SEND_VAL                                                 null
          2        DO_FCALL                                      0          
   12     3        INIT_FCALL                                               'tpl'
          4        SEND_VAL                                                 <array>
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function tpl:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/88DJ3
function name:  tpl
number of ops:  13
compiled vars:  !0 = $items, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ISSET_ISEMPTY_CV                                         !0
          2      > JMPZ                                                     ~2, ->5
    5     3    >   ECHO                                                     'No+Results%0A'
          4      > JMP                                                      ->12
    6     5    > > FE_RESET_R                                       $3      !0, ->11
          6    > > FE_FETCH_R                                               $3, !1, ->11
    7     7    >   CONCAT                                           ~4      'Result%3A+', !1
          8        CONCAT                                           ~5      ~4, '%0A'
          9        ECHO                                                     ~5
    6    10      > JMP                                                      ->6
         11    >   FE_FREE                                                  $3
    9    12    > > RETURN                                                   null

End of function tpl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.29 ms | 1397 KiB | 15 Q