You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used latest PHPCompatibility for check PHP 7 support on my legacy project code.
We have used lots of place mktime () functions, Its working fine, but phpcs reporting an error like, The function mktime does not have a parameter is_dst in PHP version 7.0 or later
Error reporting while mktime() functions parameters with date('Y') functions used otherwise fine.
Its reporting parameter is_dst error except $case_1 even there is no 7th parameter is_dst present in below example code snippets,
Hi,
I have used latest PHPCompatibility for check PHP 7 support on my legacy project code.
We have used lots of place mktime () functions, Its working fine, but phpcs reporting an error like,
The function mktime does not have a parameter is_dst in PHP version 7.0 or later
Error reporting while mktime() functions parameters with date('Y') functions used otherwise fine.
Its reporting parameter is_dst error except $case_1 even there is no 7th parameter is_dst present in below example code snippets,
`<?php
$stHour = date('H');
$arrStDt = array(date('m'), date('d'), date('Y'));
echo "\n".$case_1 = mktime($stHour, 0, 0, $arrStDt[0], $arrStDt[1], $arrStDt[2]);
echo "\n".$case_2 = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
echo "\n".$case_3 = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y') + 1);
echo "\n".$case_4 = mktime(0, 0, 0, date('m') + 1, date('d'), date('Y'));
echo "\n".$case_5 = mktime(date('H'), 0, 0, date('m'), date('d'), date('Y'));
echo "\n".$case_6 = mktime(0, 0, date('s'), date('m'), date('d'), date('Y'));
`
The text was updated successfully, but these errors were encountered: