3v4l.org

run code in 300+ PHP versions simultaneously
<?php $account_numbers = ["1234567890","12345678901234567890","1234567890123", "0000002150895","9500053963411","08014897121650000016"]; $utility_id = 1; foreach ($account_numbers as $anum) { for($i=0;$i<strlen($anum);$i++) { $char = substr($anum,$i,1); $newchar = $char == "0" ? 0 : 10-(int)$char; echo $newchar; } echo PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 6
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 6
Branch analysis from position: 25
Branch analysis from position: 6
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 6
Branch analysis from position: 25
Branch analysis from position: 6
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/9Hf7Y
function name:  (null)
number of ops:  29
compiled vars:  !0 = $account_numbers, !1 = $utility_id, !2 = $anum, !3 = $i, !4 = $char, !5 = $newchar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 1
    6     2      > FE_RESET_R                                       $8      !0, ->27
          3    > > FE_FETCH_R                                               $8, !2, ->27
    7     4    >   ASSIGN                                                   !3, 0
          5      > JMP                                                      ->22
    8     6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !3
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !4, $10
    9    12        IS_EQUAL                                                 !4, '0'
         13      > JMPZ                                                     ~12, ->16
         14    >   QM_ASSIGN                                        ~13     0
         15      > JMP                                                      ->19
         16    >   CAST                                          4  ~14     !4
         17        SUB                                              ~15     10, ~14
         18        QM_ASSIGN                                        ~13     ~15
         19    >   ASSIGN                                                   !5, ~13
   10    20        ECHO                                                     !5
    7    21        PRE_INC                                                  !3
         22    >   STRLEN                                           ~18     !2
         23        IS_SMALLER                                               !3, ~18
         24      > JMPNZ                                                    ~19, ->6
   12    25    >   ECHO                                                     '%0A'
    6    26      > JMP                                                      ->3
         27    >   FE_FREE                                                  $8
   13    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
219.43 ms | 1396 KiB | 15 Q