note 125390 rejected from migration74.incompatible by cmb

From: Date: Thu, 24 Sep 2020 07:30:18 +0000
Subject: note 125390 rejected from migration74.incompatible by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-215465@lists.php.net to get a copy of this message
Note Submitter: gyorgy dot bakocs at ipricegroup dot com ---- Hello. I faced a strange issue after upgrade our system to 7.4. In our codebase we use strptime to get the release mont to our products. In this way: $month = strptime($month, '%B')['tm_mon'] + 1; So we use '%B' -> full month name In PHP 7.2 everything works fine, but in 7.4 it returns with FALSE. I put a simple test into our system with some hardcoded data: (it is in the route.php so the test is pure php, laravel does not affect it) Route::get('test', function () { dump(strptime('Tháng 9', '%B')); dump(strptime('Tháng Chín', '%B')); }); The result in 7.2: false array:9 [▼ "tm_sec" => 0 "tm_min" => 0 "tm_hour" => 0 "tm_mday" => 0 "tm_mon" => 8 "tm_year" => 0 "tm_wday" => 5 "tm_yday" => 242 "unparsed" => "" ] So it seems OK, because 'Tháng 9' is the sort name. BUT in 7.4 array:9 [▼ "tm_sec" => 0 "tm_min" => 0 "tm_hour" => 0 "tm_mday" => 0 "tm_mon" => 8 "tm_year" => 0 "tm_wday" => 5 "tm_yday" => 242 "unparsed" => "" ] false The sort name returns with data even though I use '%B' and the long name return with false! I could not find any documentation about this change.

« previous php.notes (#215465) next »