3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pages = array("page","page","page","page","page","goal","page","page",); $lastkey = array_search("goal", $pages); $pages = array_slice($pages, 0, $lastkey+1); print_r($pages);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CIAH5
function name:  (null)
number of ops:  17
compiled vars:  !0 = $pages, !1 = $lastkey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_search'
          2        SEND_VAL                                                 'goal'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'array_slice'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        ADD                                              ~5      !1, 1
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
    6    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.11 ms | 1438 KiB | 16 Q