3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Chap.2.#"; $range = array(); for ($i = 1; $i <= 4; $i++) { $range[$i] = $i; $n = 1 . $i; $range[$n] = $n; $n = 11 . $i; $range[$n] = $n; } sort($range); foreach ($range as $digit) { echo str_replace("#",$digit),"\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 29
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 29
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
Branch analysis from position: 4
filename:       /in/poir0
function name:  (null)
number of ops:  31
compiled vars:  !0 = $str, !1 = $range, !2 = $i, !3 = $n, !4 = $digit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Chap.2.%23'
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->15
    6     4    >   ASSIGN_DIM                                               !1, !2
          5        OP_DATA                                                  !2
    8     6        CONCAT                                           ~9      '1', !2
          7        ASSIGN                                                   !3, ~9
    9     8        ASSIGN_DIM                                               !1, !3
          9        OP_DATA                                                  !3
   11    10        CONCAT                                           ~12     '11', !2
         11        ASSIGN                                                   !3, ~12
   12    12        ASSIGN_DIM                                               !1, !3
         13        OP_DATA                                                  !3
    5    14        PRE_INC                                                  !2
         15    >   IS_SMALLER_OR_EQUAL                                      !2, 4
         16      > JMPNZ                                                    ~16, ->4
   14    17    >   INIT_FCALL                                               'sort'
         18        SEND_REF                                                 !1
         19        DO_ICALL                                                 
   16    20      > FE_RESET_R                                       $18     !1, ->29
         21    > > FE_FETCH_R                                               $18, !4, ->29
   17    22    >   INIT_FCALL                                               'str_replace'
         23        SEND_VAL                                                 '%23'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                         $19     
         26        ECHO                                                     $19
         27        ECHO                                                     '%0A'
   16    28      > JMP                                                      ->21
         29    >   FE_FREE                                                  $18
   18    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.84 ms | 1461 KiB | 15 Q