Skip to content

Problem with jewishtojd For Years >= 6000 for Php8.3+ #21557

@oleibman

Description

@oleibman

Description

The following code:

<?php
for ($yh = 5995; $yh < 6005; ++$yh) {
    $rh = jewishtojd(1, 1, $yh);
    echo "yh=$yh rh=$rh\n";
}

Resulted in this output for Php8.3, 8.4, 8.5:

yh=5995 rh=2537279
yh=5996 rh=2537633
yh=5997 rh=2538016
yh=5998 rh=2538371
yh=5999 rh=2538725
yh=6000 rh=0
yh=6001 rh=0
yh=6002 rh=0
yh=6003 rh=0
yh=6004 rh=0

But I expected this output instead (as it was for Php8.2, 8.1, 8.0, and 7.4):

yh=5995 rh=2537279
yh=5996 rh=2537633
yh=5997 rh=2538016
yh=5998 rh=2538371
yh=5999 rh=2538725
yh=6000 rh=2539110
yh=6001 rh=2539463
yh=6002 rh=2539818
yh=6003 rh=2540202
yh=6004 rh=2540557

PHP Version

PHP 8.5.0 (cli) (built: Nov 18 2025 08:17:59) (ZTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.5.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.0, Copyright (c), by Zend Technologies

Operating System

Windows 11

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions