Inspectopedia Help

Misordered 'rand' function arguments

Reports the rand($min, $max) family function calls in which the max argument is less than min. For such functions as mt_rand and random_int, this will result in a fatal error.

Inspection Details

Available in:

PhpStorm 2023.3, Qodana for PHP 2023.3

Plugin:

PHP, 233.SNAPSHOT

Last modified: 13 July 2023