3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strings = [ 'dir1summary', 'dir10summary', 'dir1summarydue', 'dir10summarydue', 'directive1', 'directive10', 'directivecode1', 'directivecode10', ]; foreach ($strings as $string) { sscanf($string, '%[^0-9]%d%s', $dir, $num, $str); printf("%s%s%02d\n", str_pad($dir, 9, 'ective'), $str, $num); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 22
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/JOm6q
function name:  (null)
number of ops:  24
compiled vars:  !0 = $strings, !1 = $string, !2 = $dir, !3 = $num, !4 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   13     1      > FE_RESET_R                                           $6      !0, ->22
          2    > > FE_FETCH_R                                                   $6, !1, ->22
   14     3    >   INIT_FCALL                                                   'sscanf'
          4        SEND_VAR                                                     !1
          5        SEND_VAL                                                     '%25%5B%5E0-9%5D%25d%25s'
          6        SEND_REF                                                     !2
          7        SEND_REF                                                     !3
          8        SEND_REF                                                     !4
          9        DO_ICALL                                                     
   15    10        INIT_FCALL                                                   'printf'
         11        SEND_VAL                                                     '%25s%25s%2502d%0A'
         12        INIT_FCALL                                                   'str_pad'
         13        SEND_VAR                                                     !2
         14        SEND_VAL                                                     9
         15        SEND_VAL                                                     'ective'
         16        DO_ICALL                                             $8      
         17        SEND_VAR                                                     $8
         18        SEND_VAR                                                     !4
         19        SEND_VAR                                                     !3
         20        DO_ICALL                                                     
   13    21      > JMP                                                          ->2
         22    >   FE_FREE                                                      $6
   16    23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.73 ms | 1888 KiB | 16 Q