@@ -152,28 +152,21 @@ public static function timeUUID() {
152152 $ clock_seq = random_int (0 , 2147483647 );
153153 $ h = md5 (php_uname ());
154154
155- // Prevent "Implicit conversion from float (...) to int loses precision" in 8.5+
156- // TODO: This should really be fixed by using the bcmath functions if available!
157- set_error_handler (null );
158- try {
159- return new self ([
160- 1 ,
161- $ t & 0xFFFFFFFF ,
162- ($ t >> 32 ) & 0xFFFF ,
163- ($ t >> 48 ) & 0x0FFF ,
164- $ clock_seq ,
165- [
166- hexdec (substr ($ h , 0x0 , 2 )),
167- hexdec (substr ($ h , 0x2 , 2 )),
168- hexdec (substr ($ h , 0x4 , 2 )),
169- hexdec (substr ($ h , 0x6 , 2 )),
170- hexdec (substr ($ h , 0x8 , 2 )),
171- hexdec (substr ($ h , 0xB , 2 ))
172- ]
173- ]);
174- } finally {
175- restore_error_handler ();
176- }
155+ return new self ([
156+ 1 ,
157+ $ t & 0xFFFFFFFF ,
158+ ($ t >> 32 ) & 0xFFFF ,
159+ ($ t >> 48 ) & 0x0FFF ,
160+ $ clock_seq ,
161+ [
162+ hexdec (substr ($ h , 0x0 , 2 )),
163+ hexdec (substr ($ h , 0x2 , 2 )),
164+ hexdec (substr ($ h , 0x4 , 2 )),
165+ hexdec (substr ($ h , 0x6 , 2 )),
166+ hexdec (substr ($ h , 0x8 , 2 )),
167+ hexdec (substr ($ h , 0xB , 2 ))
168+ ]
169+ ]);
177170 }
178171
179172 /**
0 commit comments