3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '00fff0'; $index = -1; $string = substr($string, $index) ?: ''; var_dump($string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8N5Bi
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '00fff0'
    4     1        ASSIGN                                                   !1, -1
    6     2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6        JMP_SET                                          ~5      $4, ->8
          7        QM_ASSIGN                                        ~5      ''
          8        ASSIGN                                                   !0, ~5
    8     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.09 ms | 1385 KiB | 17 Q