3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.22 ms | 487 KiB | 10 Q