Skip to content

sscanf function bug #11201

@abbuaus

Description

@abbuaus

Description

The following code:

<?php
$str = "aaa\bbb\ccccDddd";
sscanf($str,"aaa\bbb\%sDddd",$str_1);
echo $str_1;
exit();

Resulted in this output:

ccccDddd

But I expected this output instead:

cccc

PHP Version

PHP 8.2.5 (cli) (built: Apr 14 2023 04:39:46) (NTS)

Operating System

debian 11.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions