We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fb9203 commit 4ae2ce0Copy full SHA for 4ae2ce0
2 files changed
src/FunctionRegistrar.php
@@ -9,8 +9,9 @@ class FunctionRegistrar
9
protected $functions = [
10
Functions\Curdate::class,
11
Functions\DateFormat::class,
12
- Functions\Substring::class,
+ Functions\Rand::class,
13
Functions\Regexp::class,
14
+ Functions\Substring::class,
15
];
16
17
/**
src/Functions/Rand.php
@@ -2,7 +2,7 @@
2
3
namespace Appel\SqliteFunctions\Functions;
4
5
-use Closure
+use Closure;
6
7
class Rand extends AbstractFunction
8
{
@@ -13,8 +13,8 @@ class Rand extends AbstractFunction
*/
public function mysql(): Closure
- return function ($seed) {
- return mt_rand() / mt_getrandmax();
+ return function ($seed = null) {
+ return mt_srand($seed) / mt_getrandmax();
18
};
19
}
20
0 commit comments