3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = array_reverse(explode(" ","This is a string, keyword next, some more text. keyword next-word.")); echo $string[array_search("keyword",$string) - 1]; /* OUTPUT next-word. */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4o4FJ
function name:  (null)
number of ops:  16
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'array_reverse'
          1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAL                                                 'This+is+a+string%2C+keyword+next%2C+some+more+text.+keyword+next-word.'
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
    3     8        INIT_FCALL                                               'array_search'
          9        SEND_VAL                                                 'keyword'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        SUB                                              ~5      $4, 1
         13        FETCH_DIM_R                                      ~6      !0, ~5
         14        ECHO                                                     ~6
    4    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.33 ms | 1003 KiB | 16 Q