3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iban = strtoupper(str_replace(' ', '', '1231')); $iban = substr($iban, 4) . substr($iban, 0, 4); $iban = str_replace( array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'), array('10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35'), $iban ); $sum = 0; for ($i = 0; $i < strlen($iban); $i++) { $sum *= 10; $sum += intval(substr($iban, $i, 1)); $sum %= 97; } return $sum == 1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 29
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 29
Branch analysis from position: 42
Branch analysis from position: 29
filename:       /in/p02gX
function name:  (null)
number of ops:  45
compiled vars:  !0 = $iban, !1 = $sum, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strtoupper'
          1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '+'
          3        SEND_VAL                                                 ''
          4        SEND_VAL                                                 '1231'
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !0, $4
    4     9        INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 4
         12        DO_ICALL                                         $6      
         13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 4
         17        DO_ICALL                                         $7      
         18        CONCAT                                           ~8      $6, $7
         19        ASSIGN                                                   !0, ~8
    6    20        INIT_FCALL                                               'str_replace'
    7    21        SEND_VAL                                                 <array>
    9    22        SEND_VAL                                                 <array>
   11    23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $10     
    6    25        ASSIGN                                                   !0, $10
   14    26        ASSIGN                                                   !1, 0
   16    27        ASSIGN                                                   !2, 0
         28      > JMP                                                      ->39
   17    29    >   ASSIGN_OP                                     3          !1, 10
   18    30        INIT_FCALL                                               'substr'
         31        SEND_VAR                                                 !0
         32        SEND_VAR                                                 !2
         33        SEND_VAL                                                 1
         34        DO_ICALL                                         $15     
         35        CAST                                          4  ~16     $15
         36        ASSIGN_OP                                     1          !1, ~16
   19    37        ASSIGN_OP                                     5          !1, 97
   16    38        PRE_INC                                                  !2
         39    >   STRLEN                                           ~20     !0
         40        IS_SMALLER                                               !2, ~20
         41      > JMPNZ                                                    ~21, ->29
   22    42    >   IS_EQUAL                                         ~22     !1, 1
         43      > RETURN                                                   ~22
         44*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.86 ms | 1405 KiB | 19 Q