3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chapter_full_path = "/last/"; $chapter_path_name = "last"; $chapter_path_name_length=strlen($chapter_path_name); $oldParentFullPathLength = strlen($chapter_full_path) - $chapter_path_name_length; $oldParentFullPath=substr($chapter_full_path,0,$oldParentFullPathLength-1); echo $oldParentFullPath;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1HSMb
function name:  (null)
number of ops:  16
compiled vars:  !0 = $chapter_full_path, !1 = $chapter_path_name, !2 = $chapter_path_name_length, !3 = $oldParentFullPathLength, !4 = $oldParentFullPath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Flast%2F'
    3     1        ASSIGN                                                   !1, 'last'
    4     2        STRLEN                                           ~7      !1
          3        ASSIGN                                                   !2, ~7
    5     4        STRLEN                                           ~9      !0
          5        SUB                                              ~10     ~9, !2
          6        ASSIGN                                                   !3, ~10
    6     7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 0
         10        SUB                                              ~12     !3, 1
         11        SEND_VAL                                                 ~12
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !4, $13
    8    14        ECHO                                                     !4
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.11 ms | 1394 KiB | 15 Q