3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo sscanf('', '%d', $num); // -1 echo "\n"; echo sscanf('foo', '%d', $num); // 0 echo "\n"; echo sscanf('411', '%d', $num); // 1 echo "\n"; echo sscanf('411', '%d%d', $num); // Fatal error: Uncaught ValueError: Different numbers of variable names and field specifiers /* echo "\n---\n"; var_export(sscanf('', '%d')); // null echo "\n"; var_export(sscanf('foo', '%d')); // [null] echo "\n"; var_export(sscanf('411', '%d')); // [411] echo "\n"; var_export(sscanf('411', '%d%d')); // [411, null] */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hbI7n
function name:  (null)
number of ops:  28
compiled vars:  !0 = $num
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'sscanf'
          1        SEND_VAL                                                     ''
          2        SEND_VAL                                                     '%25d'
          3        SEND_REF                                                     !0
          4        DO_ICALL                                             $1      
          5        ECHO                                                         $1
    4     6        ECHO                                                         '%0A'
    5     7        INIT_FCALL                                                   'sscanf'
          8        SEND_VAL                                                     'foo'
          9        SEND_VAL                                                     '%25d'
         10        SEND_REF                                                     !0
         11        DO_ICALL                                             $2      
         12        ECHO                                                         $2
    6    13        ECHO                                                         '%0A'
    7    14        INIT_FCALL                                                   'sscanf'
         15        SEND_VAL                                                     '411'
         16        SEND_VAL                                                     '%25d'
         17        SEND_REF                                                     !0
         18        DO_ICALL                                             $3      
         19        ECHO                                                         $3
    8    20        ECHO                                                         '%0A'
    9    21        INIT_FCALL                                                   'sscanf'
         22        SEND_VAL                                                     '411'
         23        SEND_VAL                                                     '%25d%25d'
         24        SEND_REF                                                     !0
         25        DO_ICALL                                             $4      
         26        ECHO                                                         $4
   20    27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.69 ms | 1392 KiB | 14 Q