3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 10, 123 ); if (version_compare(PHP_VERSION, "5.6", ">=")) { $buf = eval("return pack('N*', ...$data);"); } else { $buf = call_user_func_array("pack", array_merge(array("N*"), $data)); } $valArray = unpack( "N*", $buf ); while( list( $key, $val ) = each( $valArray ) ) { echo "$key -> $val\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 28
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 28
Branch analysis from position: 41
Branch analysis from position: 28
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
filename:       /in/9oTKi
function name:  (null)
number of ops:  42
compiled vars:  !0 = $data, !1 = $buf, !2 = $valArray, !3 = $key, !4 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'version_compare'
          2        SEND_VAL                                                 '8.0.0'
          3        SEND_VAL                                                 '5.6'
          4        SEND_VAL                                                 '%3E%3D'
          5        DO_ICALL                                         $6      
          6      > JMPZ                                                     $6, ->13
    5     7    >   ROPE_INIT                                     3  ~8      'return+pack%28%27N%2A%27%2C+...'
          8        ROPE_ADD                                      1  ~8      ~8, !0
          9        ROPE_END                                      2  ~7      ~8, '%29%3B'
         10        INCLUDE_OR_EVAL                                  $10     ~7, EVAL
         11        ASSIGN                                                   !1, $10
         12      > JMP                                                      ->22
    7    13    >   INIT_FCALL                                               'pack'
         14        INIT_FCALL                                               'array_merge'
         15        SEND_VAL                                                 <array>
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $12     
         18        SEND_ARRAY                                               $12
         19        CHECK_UNDEF_ARGS                                         
         20        DO_FCALL                                      0  $13     
         21        ASSIGN                                                   !1, $13
   10    22    >   INIT_FCALL                                               'unpack'
         23        SEND_VAL                                                 'N%2A'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $15     
         26        ASSIGN                                                   !2, $15
   12    27      > JMP                                                      ->33
   13    28    >   ROPE_INIT                                     4  ~18     !3
         29        ROPE_ADD                                      1  ~18     ~18, '+-%3E+'
         30        ROPE_ADD                                      2  ~18     ~18, !4
         31        ROPE_END                                      3  ~17     ~18, '%0A'
         32        ECHO                                                     ~17
   12    33    >   INIT_FCALL_BY_NAME                                       'each'
         34        SEND_VAR_EX                                              !2
         35        DO_FCALL                                      0  $20     
         36        FETCH_LIST_R                                     $21     $20, 0
         37        ASSIGN                                                   !3, $21
         38        FETCH_LIST_R                                     $23     $20, 1
         39        ASSIGN                                                   !4, $23
         40      > JMPNZ                                                    $20, ->28
   14    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.06 ms | 1400 KiB | 21 Q