3v4l.org

run code in 300+ PHP versions simultaneously
<?php $storagedir = '/vagrant/www/resource-space/include/../filestore'; $dir_file_path = '/vagrant/www/resource-space/include/../filestore/2/4/0_ed2583e62f4dc12/240_b69bd79a9431acc.jpeg'; $filename_rootpath = ltrim(str_replace($storagedir, '', $dir_file_path), '/'); $filename = substr($filename_rootpath, (strrpos($filename_rootpath, '/') + 1));var_dump($filename); $extension = substr($filename, (strrpos($filename_rootpath, '.') + 1));var_dump($extension);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rQ9tN
function name:  (null)
number of ops:  39
compiled vars:  !0 = $storagedir, !1 = $dir_file_path, !2 = $filename_rootpath, !3 = $filename, !4 = $extension
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fvagrant%2Fwww%2Fresource-space%2Finclude%2F..%2Ffilestore'
    4     1        ASSIGN                                                   !1, '%2Fvagrant%2Fwww%2Fresource-space%2Finclude%2F..%2Ffilestore%2F2%2F4%2F0_ed2583e62f4dc12%2F240_b69bd79a9431acc.jpeg'
    6     2        INIT_FCALL                                               'ltrim'
          3        INIT_FCALL                                               'str_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 ''
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        SEND_VAR                                                 $7
          9        SEND_VAL                                                 '%2F'
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !2, $8
    7    12        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !2
         14        INIT_FCALL                                               'strrpos'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 '%2F'
         17        DO_ICALL                                         $10     
         18        ADD                                              ~11     $10, 1
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !3, $12
         22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
    8    25        INIT_FCALL                                               'substr'
         26        SEND_VAR                                                 !3
         27        INIT_FCALL                                               'strrpos'
         28        SEND_VAR                                                 !2
         29        SEND_VAL                                                 '.'
         30        DO_ICALL                                         $15     
         31        ADD                                              ~16     $15, 1
         32        SEND_VAL                                                 ~16
         33        DO_ICALL                                         $17     
         34        ASSIGN                                                   !4, $17
         35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !4
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.31 ms | 1388 KiB | 23 Q