3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "1,2,3,4", "1,2,3", "1,2" ]; $minElements = 3; $defaultVal = null; foreach ($strings as $string) { [$a, $b, $c] = array_pad(explode(',', $string, $minElements), $minElements, $defaultVal); var_export($a); echo ' _ '; var_export($b); echo ' _ '; var_export($c); echo "\n-----------------\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 35
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 35
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/jmAiS
function name:  (null)
number of ops:  37
compiled vars:  !0 = $strings, !1 = $minElements, !2 = $defaultVal, !3 = $string, !4 = $a, !5 = $b, !6 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 3
    9     2        ASSIGN                                                   !2, null
   11     3      > FE_RESET_R                                       $10     !0, ->35
          4    > > FE_FETCH_R                                               $10, !3, ->35
   12     5    >   INIT_FCALL                                               'array_pad'
          6        INIT_FCALL                                               'explode'
          7        SEND_VAL                                                 '%2C'
          8        SEND_VAR                                                 !3
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $11     
         11        SEND_VAR                                                 $11
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $12     
         15        FETCH_LIST_R                                     $13     $12, 0
         16        ASSIGN                                                   !4, $13
         17        FETCH_LIST_R                                     $15     $12, 1
         18        ASSIGN                                                   !5, $15
         19        FETCH_LIST_R                                     $17     $12, 2
         20        ASSIGN                                                   !6, $17
         21        FREE                                                     $12
   13    22        INIT_FCALL                                               'var_export'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
   14    25        ECHO                                                     '+_+'
   15    26        INIT_FCALL                                               'var_export'
         27        SEND_VAR                                                 !5
         28        DO_ICALL                                                 
   16    29        ECHO                                                     '+_+'
   17    30        INIT_FCALL                                               'var_export'
         31        SEND_VAR                                                 !6
         32        DO_ICALL                                                 
   18    33        ECHO                                                     '%0A-----------------%0A'
   11    34      > JMP                                                      ->4
         35    >   FE_FREE                                                  $10
   19    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.11 ms | 1013 KiB | 16 Q