3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sub = substr('abcdef', 4, -4); if ($sub === false) { echo 'fail'; } else { echo 'do somthing with $sub'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ln9g3
function name:  (null)
number of ops:  12
compiled vars:  !0 = $sub
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'substr'
          1        SEND_VAL                                                 'abcdef'
          2        SEND_VAL                                                 4
          3        SEND_VAL                                                 -4
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    5     6        TYPE_CHECK                                    4          !0
          7      > JMPZ                                                     ~3, ->10
    6     8    >   ECHO                                                     'fail'
          9      > JMP                                                      ->11
    8    10    >   ECHO                                                     'do+somthing+with+%24sub'
    9    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.29 ms | 1394 KiB | 15 Q