3v4l.org

run code in 300+ PHP versions simultaneously
<?php function returnNumber($index) { $values = array(1,2,3,4,5); return isset($values[$index]) ? $values[$index] : 0; } print returnNumber(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VPhdX
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'returnnumber'
          1        SEND_VAL                                                 2
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function returnnumber:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VPhdX
function name:  returnNumber
number of ops:  10
compiled vars:  !0 = $index, !1 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    5     2        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !0
          3      > JMPZ                                                     ~3, ->7
          4    >   FETCH_DIM_R                                      ~4      !1, !0
          5        QM_ASSIGN                                        ~5      ~4
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~5      0
          8    > > RETURN                                                   ~5
    6     9*     > RETURN                                                   null

End of function returnnumber

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.98 ms | 1397 KiB | 14 Q