3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt="Fatti&Storie 5 - Lorem ipsum dolor sit amet [nid:35]"; $end = strripos($txt, ']'); $start =strripos($txt, ':'); $leng = $end-$start; $start=$start+1; $end= $end-1; echo $start; echo "<br/>"; echo $end; echo "<br/>"; $a=substr($txt, $start, $leng); echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0rXdU
function name:  (null)
number of ops:  29
compiled vars:  !0 = $txt, !1 = $end, !2 = $start, !3 = $leng, !4 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Fatti%26Storie+5+-+Lorem+ipsum+dolor+sit+amet+%5Bnid%3A35%5D'
    3     1        INIT_FCALL                                               'strripos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%5D'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    4     6        INIT_FCALL                                               'strripos'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '%3A'
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    5    11        SUB                                              ~10     !1, !2
         12        ASSIGN                                                   !3, ~10
    6    13        ADD                                              ~12     !2, 1
         14        ASSIGN                                                   !2, ~12
    7    15        SUB                                              ~14     !1, 1
         16        ASSIGN                                                   !1, ~14
    8    17        ECHO                                                     !2
    9    18        ECHO                                                     '%3Cbr%2F%3E'
   10    19        ECHO                                                     !1
   11    20        ECHO                                                     '%3Cbr%2F%3E'
   12    21        INIT_FCALL                                               'substr'
         22        SEND_VAR                                                 !0
         23        SEND_VAR                                                 !2
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                         $16     
         26        ASSIGN                                                   !4, $16
   13    27        ECHO                                                     !4
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.11 ms | 1395 KiB | 17 Q