3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = 'App\Bar\FooControllerABC'; $length = strlen($c); var_dump(strrpos($c, 'Controller') === $length - 10); var_dump('Controller' == substr($c, -10));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSL3u
function name:  (null)
number of ops:  21
compiled vars:  !0 = $c, !1 = $length
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'App%5CBar%5CFooControllerABC'
    4     1        STRLEN                                           ~3      !0
          2        ASSIGN                                                   !1, ~3
    6     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'strrpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'Controller'
          7        DO_ICALL                                         $5      
          8        SUB                                              ~6      !1, 10
          9        IS_IDENTICAL                                     ~7      $5, ~6
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 -10
         16        DO_ICALL                                         $9      
         17        IS_EQUAL                                         ~10     $9, 'Controller'
         18        SEND_VAL                                                 ~10
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.23 ms | 1395 KiB | 19 Q