3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'test/ezifh'; $f = $reverse ? 'strrpos' : 'strpos'; if (($pos = $f($str, $separator)) !== FALSE) { $str = substr($str, $pos + 1); } var_dump($str);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
Branch analysis from position: 19
filename:       /in/7726e
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $f, !2 = $reverse, !3 = $pos, !4 = $separator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test%2Fezifh'
    3     1      > JMPZ                                                     !2, ->4
          2    >   QM_ASSIGN                                        ~6      'strrpos'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~6      'strpos'
          5    >   ASSIGN                                                   !1, ~6
    4     6        INIT_DYNAMIC_CALL                                        !1
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !4
          9        DO_FCALL                                      0  $8      
         10        ASSIGN                                           ~9      !3, $8
         11        TYPE_CHECK                                  1018          ~9
         12      > JMPZ                                                     ~10, ->19
    5    13    >   INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !0
         15        ADD                                              ~11     !3, 1
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !0, $12
    7    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.3 ms | 940 KiB | 18 Q