3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'abcdef'; echo substr($string, 2, 3).PHP_EOL; // cde echo substr($string, 2, 0).PHP_EOL; // (nothing) echo substr($string, 2, 10).PHP_EOL; // the rest echo substr($string, 2, null).PHP_EOL; // the rest echo substr($string, 2).PHP_EOL; // the rest
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3r0F1
function name:  (null)
number of ops:  21
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'abcdef'
    5     1        FRAMELESS_ICALL_3                substr              ~2      !0, 2
          2        OP_DATA                                                      3
          3        CONCAT                                               ~3      ~2, '%0A'
          4        ECHO                                                         ~3
    6     5        FRAMELESS_ICALL_3                substr              ~4      !0, 2
          6        OP_DATA                                                      0
          7        CONCAT                                               ~5      ~4, '%0A'
          8        ECHO                                                         ~5
    8     9        FRAMELESS_ICALL_3                substr              ~6      !0, 2
         10        OP_DATA                                                      10
         11        CONCAT                                               ~7      ~6, '%0A'
         12        ECHO                                                         ~7
    9    13        FRAMELESS_ICALL_3                substr              ~8      !0, 2
         14        OP_DATA                                                      null
         15        CONCAT                                               ~9      ~8, '%0A'
         16        ECHO                                                         ~9
   10    17        FRAMELESS_ICALL_2                substr              ~10     !0, 2
         18        CONCAT                                               ~11     ~10, '%0A'
         19        ECHO                                                         ~11
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.61 ms | 770 KiB | 8 Q