Skip to content

False report on Undefined variable on sscanf #26

@TomasVotruba

Description

@TomasVotruba

Message

 30     Undefined variable: $minutes                             
  30     Undefined variable: $seconds                             
  31     Undefined variable: $minutes                             
  31     Undefined variable: $minutes   

Code

sscanf($time, '%d:%d:%d', $hours, $minutes, $seconds);
$seconds = isset($seconds) ? $hours * 3600 + $minutes * 60 + $seconds : $hours * 60 + $minutes;

Those values are created with references in method.

See sscanf doc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions