3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phone_no=918553649086; $length=strlen($phone_no); if($length==12){ $nineone = substr($phone_no, 0, 2); if($nineone==91){ $phone_no=substr($phone_no,-10); echo $phone_no; echo $nineone; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 20
filename:       /in/nmt2Z
function name:  (null)
number of ops:  21
compiled vars:  !0 = $phone_no, !1 = $length, !2 = $nineone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 918553649086
    3     1        STRLEN                                           ~4      !0
          2        ASSIGN                                                   !1, ~4
    4     3        IS_EQUAL                                                 !1, 12
          4      > JMPZ                                                     ~6, ->20
    5     5    >   INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
    6    11        IS_EQUAL                                                 !2, 91
         12      > JMPZ                                                     ~9, ->20
    7    13    >   INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 -10
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !0, $10
    8    18        ECHO                                                     !0
    9    19        ECHO                                                     !2
   11    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.47 ms | 1386 KiB | 15 Q