3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["a" => "one", "b" => "two", "c" => "three"]; if (!function_exists("array_key_last")) { echo "Please upgrade to php 7.3"; } else { echo "First Key: " , key($array) , "\n"; echo "Last Key: " , array_key_last($array) , "\n"; next($array); echo "Second Key: " , key($array) , "\n"; echo "Last Key: " , array_key_last($array); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B3EWY
function name:  (null)
number of ops:  35
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'function_exists'
          2        SEND_VAL                                                 'array_key_last'
          3        DO_ICALL                                         $2      
          4        BOOL_NOT                                         ~3      $2
          5      > JMPZ                                                     ~3, ->8
    4     6    >   ECHO                                                     'Please+upgrade+to+php+7.3'
    3     7      > JMP                                                      ->34
    6     8    >   ECHO                                                     'First+Key%3A+'
          9        INIT_FCALL                                               'key'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ECHO                                                     $4
         13        ECHO                                                     '%0A'
    7    14        ECHO                                                     'Last+Key%3A+'
         15        INIT_FCALL                                               'array_key_last'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $5      
         18        ECHO                                                     $5
         19        ECHO                                                     '%0A'
    8    20        INIT_FCALL                                               'next'
         21        SEND_REF                                                 !0
         22        DO_ICALL                                                 
    9    23        ECHO                                                     'Second+Key%3A+'
         24        INIT_FCALL                                               'key'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $7      
         27        ECHO                                                     $7
         28        ECHO                                                     '%0A'
   10    29        ECHO                                                     'Last+Key%3A+'
         30        INIT_FCALL                                               'array_key_last'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $8      
         33        ECHO                                                     $8
   11    34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.36 ms | 1463 KiB | 17 Q