3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.53 ms | 1394 KiB | 15 Q