3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Features\\Contexts\\AdminContext"; $noContext = substr($string, 0, -7); $actor = end(explode('\\', $noContext)); var_dump($actor);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lqF4D
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $noContext, !2 = $actor
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Features%5CContexts%5CAdminContext'
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 -7
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    6     7        INIT_FCALL                                               'end'
          8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%5C'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        SEND_VAR_NO_REF                               0          $6
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !2, $7
    8    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.47 ms | 1399 KiB | 21 Q