Skip to content

type issue in date #19728

@chongwick

Description

@chongwick

Description

The following code:

<?php
$v_214324 = '\n';
$v_214286 = date_default_timezone_set($v_214324,);
$v_214314 = 'sha224';
$v_214315 = 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq';
$v_214316 = hash($v_214314,$v_214315,);
$v_214288 = strtotime($v_214316,);
$v_214289 = 51.48;
$v_214305 = '012345678901234567890123456789012345678901234567890123456789';
while($v_214305){
$v_214291 = date_sun_info($v_214288,$v_214289,$v_214305,);
}

Resulted in this output:

/home/w023dtc/nightly_php/php-src/ext/date/lib/astro.c:268:17: runtime error: -nan is outside the range of representable values of type 'long long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/ext/date/lib/astro.c:268:17 in

But I expected this output instead:

PHP Version

nightly

Operating System

20.04

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