3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = 'CFE 2012 DECL INITIAL.pdf'; $extension = 'pdf'; $name = substr($name, 0, (strlen($name)-strlen($extension)+1)); var_dump($name);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X9bOD
function name:  (null)
number of ops:  16
compiled vars:  !0 = $name, !1 = $extension
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'CFE+2012+DECL+INITIAL.pdf'
    4     1        ASSIGN                                                   !1, 'pdf'
    7     2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 0
          5        STRLEN                                           ~4      !0
          6        STRLEN                                           ~5      !1
          7        SUB                                              ~6      ~4, ~5
          8        ADD                                              ~7      ~6, 1
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !0, $8
   10    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.8 ms | 1394 KiB | 17 Q