3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "In My Cart : 11 items"; list($count) = sscanf($str, 'In My Cart : %s items'); var_dump($count); echo "\n"; list($count) = sscanf($str, 'In My Cart : %d items'); var_dump($count);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lLTXv
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $count
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'In+My+Cart+%3A+11+items'
    4     1        INIT_FCALL                                                   'sscanf'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     'In+My+Cart+%3A+%25s+items'
          4        DO_ICALL                                             $3      
          5        FETCH_LIST_R                                         $4      $3, 0
          6        ASSIGN                                                       !1, $4
          7        FREE                                                         $3
    5     8        INIT_FCALL                                                   'var_dump'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                                     
    7    11        ECHO                                                         '%0A'
    9    12        INIT_FCALL                                                   'sscanf'
         13        SEND_VAR                                                     !0
         14        SEND_VAL                                                     'In+My+Cart+%3A+%25d+items'
         15        DO_ICALL                                             $7      
         16        FETCH_LIST_R                                         $8      $7, 0
         17        ASSIGN                                                       !1, $8
         18        FREE                                                         $7
   10    19        INIT_FCALL                                                   'var_dump'
         20        SEND_VAR                                                     !1
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.7 ms | 1996 KiB | 15 Q