3v4l.org

run code in 300+ PHP versions simultaneously
<?php function awesome(...$arrays) { if (!is_array($arrays)) return false; $merged = array_shift($arrays); print_r($arrays); //if (sizeof($arrays) === 1) return array_shift($arrays); //$merged = } awesome(array('A', 'B'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hNrZr
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'awesome'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function awesome:
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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hNrZr
function name:  awesome
number of ops:  13
compiled vars:  !0 = $arrays, !1 = $merged
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_VARIADIC                                    !0      
    4     1        TYPE_CHECK                                  128  ~2      !0
          2        BOOL_NOT                                         ~3      ~2
          3      > JMPZ                                                     ~3, ->5
          4    > > RETURN                                                   <false>
    5     5    >   INIT_FCALL                                               'array_shift'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
    6     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   10    12      > RETURN                                                   null

End of function awesome

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.62 ms | 1397 KiB | 18 Q