3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://33c5def5fd5303508478-404edcebd16173bc1f7617706b5a3522.r34.cf2.rackcdn.com/91@2x.png'; $urlParts = parse_url($url); $ext = substr($urlParts['path'], 0, -3); var_dump($ext);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9W477
function name:  (null)
number of ops:  16
compiled vars:  !0 = $url, !1 = $urlParts, !2 = $ext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2F33c5def5fd5303508478-404edcebd16173bc1f7617706b5a3522.r34.cf2.rackcdn.com%2F91%402x.png'
    4     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    5     5        INIT_FCALL                                               'substr'
          6        FETCH_DIM_R                                      ~6      !1, 'path'
          7        SEND_VAL                                                 ~6
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 -3
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    6    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.34 ms | 1394 KiB | 19 Q