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 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 25
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 25
Branch analysis from position: 38
Branch analysis from position: 25
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
filename:       /in/t4nuZ
function name:  (null)
number of ops:  39
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, ->10
    5     7    >   INCLUDE_OR_EVAL                                  $7      'return+pack%28%22N%2A%22%2C+...%24data%29%3B', EVAL
          8        ASSIGN                                                   !1, $7
          9      > JMP                                                      ->19
    7    10    >   INIT_FCALL                                               'pack'
         11        INIT_FCALL                                               'array_merge'
         12        SEND_VAL                                                 <array>
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $9      
         15        SEND_ARRAY                                               $9
         16        CHECK_UNDEF_ARGS                                         
         17        DO_FCALL                                      0  $10     
         18        ASSIGN                                                   !1, $10
   10    19    >   INIT_FCALL                                               'unpack'
         20        SEND_VAL                                                 'N%2A'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $12     
         23        ASSIGN                                                   !2, $12
   12    24      > JMP                                                      ->30
   13    25    >   ROPE_INIT                                     4  ~15     !3
         26        ROPE_ADD                                      1  ~15     ~15, '+-%3E+'
         27        ROPE_ADD                                      2  ~15     ~15, !4
         28        ROPE_END                                      3  ~14     ~15, '%0A'
         29        ECHO                                                     ~14
   12    30    >   INIT_FCALL_BY_NAME                                       'each'
         31        SEND_VAR_EX                                              !2
         32        DO_FCALL                                      0  $17     
         33        FETCH_LIST_R                                     $18     $17, 0
         34        ASSIGN                                                   !3, $18
         35        FETCH_LIST_R                                     $20     $17, 1
         36        ASSIGN                                                   !4, $20
         37      > JMPNZ                                                    $17, ->25
   14    38    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.08 ms | 1404 KiB | 21 Q