3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "01-3-567-90"; var_dump(strrpos($text, "-") , mb_strrpos($text, "-")); var_dump(strrpos($text, "-", 7) , mb_strrpos($text, "-", 7)); var_dump(strrpos($text, "-", -4), mb_strrpos($text, "-", -4));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mCdGh
function name:  (null)
number of ops:  42
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '01-3-567-90'
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'strrpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '-'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        INIT_FCALL                                               'mb_strrpos'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 '-'
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                                 
    4    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'strrpos'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 '-'
         17        SEND_VAL                                                 7
         18        DO_ICALL                                         $5      
         19        SEND_VAR                                                 $5
         20        INIT_FCALL                                               'mb_strrpos'
         21        SEND_VAR                                                 !0
         22        SEND_VAL                                                 '-'
         23        SEND_VAL                                                 7
         24        DO_ICALL                                         $6      
         25        SEND_VAR                                                 $6
         26        DO_ICALL                                                 
    5    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'strrpos'
         29        SEND_VAR                                                 !0
         30        SEND_VAL                                                 '-'
         31        SEND_VAL                                                 -4
         32        DO_ICALL                                         $8      
         33        SEND_VAR                                                 $8
         34        INIT_FCALL                                               'mb_strrpos'
         35        SEND_VAR                                                 !0
         36        SEND_VAL                                                 '-'
         37        SEND_VAL                                                 -4
         38        DO_ICALL                                         $9      
         39        SEND_VAR                                                 $9
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.79 ms | 1396 KiB | 19 Q