3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "http://hls.v.momocdn.com/live/gdws360abc/playlist.m3u8"; $startloc = strrpos($a,"/live"); $endloc = strrpos($a,"/playlist.m3u8"); echo $startloc; echo $endloc; echo substr($a,$startloc+6,$endloc-$startloc-6);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/na3bu
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $startloc, !2 = $endloc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fhls.v.momocdn.com%2Flive%2Fgdws360abc%2Fplaylist.m3u8'
    3     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2Flive'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        INIT_FCALL                                               'strrpos'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '%2Fplaylist.m3u8'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    5    11        ECHO                                                     !1
    6    12        ECHO                                                     !2
    7    13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !0
         15        ADD                                              ~8      !1, 6
         16        SEND_VAL                                                 ~8
         17        SUB                                              ~9      !2, !1
         18        SUB                                              ~10     ~9, 6
         19        SEND_VAL                                                 ~10
         20        DO_ICALL                                         $11     
         21        ECHO                                                     $11
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.45 ms | 1460 KiB | 15 Q