3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'http://www.azlyrics.com/a/abba.html'; $pos = strrpos($str, '.html'); $get = substr($str, 0, $pos); echo $get; $pos2 = strrchar($get, '/'); $get2 = substr($get, $pos2, '-0'); echo $get2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NVBMb
function name:  (null)
number of ops:  26
compiled vars:  !0 = $str, !1 = $pos, !2 = $get, !3 = $pos2, !4 = $get2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fwww.azlyrics.com%2Fa%2Fabba.html'
    4     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '.html'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !2, $8
    7    12        ECHO                                                     !2
    9    13        INIT_FCALL_BY_NAME                                       'strrchar'
         14        SEND_VAR_EX                                              !2
         15        SEND_VAL_EX                                              '%2F'
         16        DO_FCALL                                      0  $10     
         17        ASSIGN                                                   !3, $10
   10    18        INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !2
         20        SEND_VAR                                                 !3
         21        SEND_VAL                                                 '-0'
         22        DO_ICALL                                         $12     
         23        ASSIGN                                                   !4, $12
   11    24        ECHO                                                     !4
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.47 ms | 1395 KiB | 17 Q