3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name='abcdefOL'; $name = str_pad($name, 6, '0', STR_PAD_LEFT); $file = substr($name, 0, strlen($name) - 3) . '/' . substr($name, -3, 3) . '/' . $name; var_dump($file);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LaV9o
function name:  (null)
number of ops:  29
compiled vars:  !0 = $name, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abcdefOL'
    5     1        INIT_FCALL                                               'str_pad'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 6
          4        SEND_VAL                                                 '0'
          5        SEND_VAL                                                 0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    6     8        INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 0
         11        STRLEN                                           ~5      !0
         12        SUB                                              ~6      ~5, 3
         13        SEND_VAL                                                 ~6
         14        DO_ICALL                                         $7      
         15        CONCAT                                           ~8      $7, '%2F'
         16        INIT_FCALL                                               'substr'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 -3
         19        SEND_VAL                                                 3
         20        DO_ICALL                                         $9      
         21        CONCAT                                           ~10     ~8, $9
         22        CONCAT                                           ~11     ~10, '%2F'
         23        CONCAT                                           ~12     ~11, !0
         24        ASSIGN                                                   !1, ~12
    7    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.6 ms | 1395 KiB | 19 Q