3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a' => 2, 'b' => 1, 'c' => 4); krsort($array); print_r($array); $array = array('q' => 2, 'b' => 1, 'z' => 4); $array = array_reverse($array); print_r($array); $array = array('a' => 2, 'b' => 1, 'c' => 4); $first = array_shift($array); array_unshift(array_pop($array)); array_push($array,$first); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mtKT3
function name:  (null)
number of ops:  34
compiled vars:  !0 = $array, !1 = $first
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'krsort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    6     7        ASSIGN                                                   !0, <array>
    7     8        INIT_FCALL                                               'array_reverse'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !0, $6
    8    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
   10    15        ASSIGN                                                   !0, <array>
   11    16        INIT_FCALL                                               'array_shift'
         17        SEND_REF                                                 !0
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !1, $10
   12    20        INIT_FCALL                                               'array_unshift'
         21        INIT_FCALL                                               'array_pop'
         22        SEND_REF                                                 !0
         23        DO_ICALL                                         $12     
         24        SEND_VAR_NO_REF                               0          $12
         25        DO_ICALL                                                 
   13    26        INIT_FCALL                                               'array_push'
         27        SEND_REF                                                 !0
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                                 
   14    30        INIT_FCALL                                               'print_r'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.42 ms | 1388 KiB | 27 Q