3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('leg1'=>'LA', 'leg2'=>'NY', 'leg3'=>'NY', 'leg4'=>'FL'); while(current($a)) { $output[] = key($a) . ":" . current($a); next($a); $output[] = key($a) . ":" . current($a); next($a); } print_r($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 2
Branch analysis from position: 32
Branch analysis from position: 2
filename:       /in/I20bF
function name:  (null)
number of ops:  36
compiled vars:  !0 = $a, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->28
    5     2    >   INIT_FCALL                                               'key'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        CONCAT                                           ~5      $4, '%3A'
          6        INIT_FCALL                                               'current'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        CONCAT                                           ~7      ~5, $6
         10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  ~7
    7    12        INIT_FCALL                                               'next'
         13        SEND_REF                                                 !0
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'key'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $10     
         18        CONCAT                                           ~11     $10, '%3A'
         19        INIT_FCALL                                               'current'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $12     
         22        CONCAT                                           ~13     ~11, $12
         23        ASSIGN_DIM                                               !1
         24        OP_DATA                                                  ~13
   10    25        INIT_FCALL                                               'next'
         26        SEND_REF                                                 !0
         27        DO_ICALL                                                 
    4    28    >   INIT_FCALL                                               'current'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $15     
         31      > JMPNZ                                                    $15, ->2
   13    32    >   INIT_FCALL                                               'print_r'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.76 ms | 1401 KiB | 21 Q