3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = "IPC_IPCamera_13_7_24_9_57_45.jpg"; $parts = explode("_", $name); for ($i = 0; $i < count($parts); $i++) { $part = $parts[$i]; if (count($part) == 1) { $part = "0" . $part; } $name .= $part . "_"; } echo $name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
Branch analysis from position: 8
Branch analysis from position: 15
filename:       /in/mmTb3
function name:  (null)
number of ops:  23
compiled vars:  !0 = $name, !1 = $parts, !2 = $i, !3 = $part
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'IPC_IPCamera_13_7_24_9_57_45.jpg'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '_'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    7     6        ASSIGN                                                   !2, 0
          7      > JMP                                                      ->18
    8     8    >   FETCH_DIM_R                                      ~8      !1, !2
          9        ASSIGN                                                   !3, ~8
   10    10        COUNT                                            ~10     !3
         11        IS_EQUAL                                                 ~10, 1
         12      > JMPZ                                                     ~11, ->15
   11    13    >   CONCAT                                           ~12     '0', !3
         14        ASSIGN                                                   !3, ~12
   14    15    >   CONCAT                                           ~14     !3, '_'
         16        ASSIGN_OP                                     8          !0, ~14
    7    17        PRE_INC                                                  !2
         18    >   COUNT                                            ~17     !1
         19        IS_SMALLER                                               !2, ~17
         20      > JMPNZ                                                    ~18, ->8
   18    21    >   ECHO                                                     !0
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.33 ms | 1395 KiB | 15 Q