3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'MAy'; $p = 'MAy'; $t = strpos($s, $p) === 0 ? substr($s, strlen($p)) : $s; var_dump($t);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tdvDY
function name:  (null)
number of ops:  21
compiled vars:  !0 = $s, !1 = $p, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'MAy'
    4     1        ASSIGN                                                   !1, 'MAy'
    5     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        IS_IDENTICAL                                             $5, 0
          7      > JMPZ                                                     ~6, ->15
          8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        STRLEN                                           ~7      !1
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13        QM_ASSIGN                                        ~9      $8
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~9      !0
         16    >   ASSIGN                                                   !2, ~9
    6    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.13 ms | 1399 KiB | 19 Q