3v4l.org

run code in 300+ PHP versions simultaneously
<?php // getting the serial number list($serial) = sscanf("SN/2350001", "SN/%d"); // and the date of manufacturing $mandate = "January 01 2000"; list($month, $day, $year) = sscanf($mandate, "%s %d %d"); echo "Item $serial was manufactured on: $year-" . substr($month, 0, 3) . "-$day\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QiesB
function name:  (null)
number of ops:  36
compiled vars:  !0 = $serial, !1 = $mandate, !2 = $month, !3 = $day, !4 = $year
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'sscanf'
          1        SEND_VAL                                                 'SN%2F2350001'
          2        SEND_VAL                                                 'SN%2F%25d'
          3        DO_ICALL                                         $5      
          4        FETCH_LIST_R                                     $6      $5, 0
          5        ASSIGN                                                   !0, $6
          6        FREE                                                     $5
    6     7        ASSIGN                                                   !1, 'January+01+2000'
    7     8        INIT_FCALL                                               'sscanf'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 '%25s+%25d+%25d'
         11        DO_ICALL                                         $9      
         12        FETCH_LIST_R                                     $10     $9, 0
         13        ASSIGN                                                   !2, $10
         14        FETCH_LIST_R                                     $12     $9, 1
         15        ASSIGN                                                   !3, $12
         16        FETCH_LIST_R                                     $14     $9, 2
         17        ASSIGN                                                   !4, $14
         18        FREE                                                     $9
    8    19        ROPE_INIT                                     5  ~17     'Item+'
         20        ROPE_ADD                                      1  ~17     ~17, !0
         21        ROPE_ADD                                      2  ~17     ~17, '+was+manufactured+on%3A+'
         22        ROPE_ADD                                      3  ~17     ~17, !4
         23        ROPE_END                                      4  ~16     ~17, '-'
         24        INIT_FCALL                                               'substr'
         25        SEND_VAR                                                 !2
         26        SEND_VAL                                                 0
         27        SEND_VAL                                                 3
         28        DO_ICALL                                         $20     
         29        CONCAT                                           ~21     ~16, $20
         30        ROPE_INIT                                     3  ~23     '-'
         31        ROPE_ADD                                      1  ~23     ~23, !3
         32        ROPE_END                                      2  ~22     ~23, '%0A'
         33        CONCAT                                           ~25     ~21, ~22
         34        ECHO                                                     ~25
    9    35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.85 ms | 1400 KiB | 17 Q