3v4l.org

run code in 300+ PHP versions simultaneously
<?php function explodeDeluxe($string, $nrArgs) { return explode(' ', $string, $nrArgs) + array_fill(0, $nrArgs, null); } var_dump(explodeDeluxe('a b c', 2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sAbHl
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'explodedeluxe'
          2        SEND_VAL                                                 'a+b+c'
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function explodedeluxe:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sAbHl
function name:  explodeDeluxe
number of ops:  15
compiled vars:  !0 = $string, !1 = $nrArgs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $2      
          7        INIT_FCALL                                               'array_fill'
          8        SEND_VAL                                                 0
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 null
         11        DO_ICALL                                         $3      
         12        ADD                                              ~4      $2, $3
         13      > RETURN                                                   ~4
    6    14*     > RETURN                                                   null

End of function explodedeluxe

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.79 ms | 1398 KiB | 20 Q