visus-io / php-cuid2 Goto Github PK
View Code? Open in Web Editor NEWPHP implementation of collision-resistant ids
License: MIT License
PHP implementation of collision-resistant ids
License: MIT License
Hi,
Was wondering if there is a strict reason why 8.1 is the requirement for this library. We have old Wordpress sites that still run on 7.x or 8.0, which means this library is incompatible.
If there is no specific reason for 8.1- would you mind reducing that requirement to 8.0 (or 7.x if that's possible, even).
Your cuid library is the only one which doesn't seem to use getmypid
which is great! Some Wordpress hosts seem to disable that for some reason. So I'd very much like to use your library.
I'm using the library as described:
$cuid = new Xaevik\Cuid2\Cuid2();
But the output of that $cuid
is becoming something that looks like this:
O:18:"Xaevik\Cuid2\Cuid2":7:{s:27:"�Xaevik\Cuid2\Cuid2�counter";i:8319600625812766720;s:31:"�Xaevik\Cuid2\Cuid2�fingerprint";a:128:{i:1;i:98;i:2;i:54;i:3;i:56;i:4;i:49;i:5;i:99;i:6;i:102;i:7;i:100;i:8;i:48;i:9;i:101;i:10;i:97;i:11;i:97;i:12;i:48;i:13;i:52;i:14;i:50;i:15;i:97;i:16;i:57;i:17;i:51;i:18;i:97;i:19;i:51;i:20;i:55;i:21;i:57;i:22;i:48;i:23;i:97;i:24;i:55;i:25;i:57;i:26;i:55;i:27;i:101;i:28;i:102;i:29;i:51;i:30;i:100;i:31;i:48;i:32;i:99;i:33;i:53;i:34;i:102;i:35;i:53;i:36;i:100;i:37;i:50;i:38;i:56;i:39;i:56;i:40;i:49;i:41;i:48;i:42;i:57;i:43;i:97;i:44;i:53;i:45;i:97;i:46;i:48;i:47;i:54;i:48;i:54;i:49;i:50;i:50;i:97;i:51;i:51;i:52;i:99;i:53;i:57;i:54;i:100;i:55;i:54;i:56;i:57;i:57;i:98;i:58;i:101;i:59;i:56;i:60;i:52;i:61;i:100;i:62;i:54;i:63;i:100;i:64;i:55;i:65;i:52;i:66;i:99;i:67;i:101;i:68;i:50;i:69;i:101;i:70;i:99;i:71;i:55;i:72;i:54;i:73;i:57;i:74;i:57;i:75;i:97;i:76;i:54;i:77;i:55;i:78;i:99;i:79;i:51;i:80;i:55;i:81;i:55;i:82;i:100;i:83;i:51;i:84;i:97;i:85;i:57;i:86;i:55;i:87;i:102;i:88;i:102;i:89;i:53;i:90;i:102;i:91;i:100;i:92;i:52;i:93;i:57;i:94;i:50;i:95;i:98;i:96;i:55;i:97;i:55;i:98;i:97;i:99;i:100;i:100;i:102;i:101;i:50;i:102;i:101;i:103;i:56;i:104;i:49;i:105;i:98;i:106;i:99;i:107;i:102;i:108;i:54;i:109;i:52;i:110;i:51;i:111;i:50;i:112;i:49;i:113;i:49;i:114;i:49;i:115;i:48;i:116;i:54;i:117;i:57;i:118;i:48;i:119;i:50;i:120;i:102;i:121;i:97;i:122;i:101;i:123;i:56;i:124;i:57;i:125;i:57;i:126;i:102;i:127;i:50;i:128;i:100;}s:26:"�Xaevik\Cuid2\Cuid2�length";i:24;s:26:"�Xaevik\Cuid2\Cuid2�prefix";s:1:"t";s:26:"�Xaevik\Cuid2\Cuid2�random";a:24:{i:1;i:8;i:2;i:149;i:3;i:179;i:4;i:198;i:5;i:29;i:6;i:88;i:7;i:160;i:8;i:61;i:9;i:246;i:10;i:125;i:11;i:244;i:12;i:54;i:13;i:42;i:14;i:29;i:15;i:110;i:16;i:128;i:17;i:41;i:18;i:23;i:19;i:206;i:20;i:227;i:21;i:117;i:22;i:171;i:23;i:239;i:24;i:68;}s:24:"�Xaevik\Cuid2\Cuid2�salt";a:24:{i:1;i:248;i:2;i:133;i:3;i:73;i:4;i:114;i:5;i:46;i:6;i:93;i:7;i:133;i:8;i:104;i:9;i:196;i:10;i:106;i:11;i:253;i:12;i:245;i:13;i:33;i:14;i:181;i:15;i:221;i:16;i:72;i:17;i:231;i:18;i:92;i:19;i:106;i:20;i:241;i:21;i:73;i:22;i:210;i:23;i:36;i:24;i:109;}s:29:"�Xaevik\Cuid2\Cuid2�timestamp";i:1674668616265;}
I think I've realized that to make sure I get a string for the cuid (as I just expected to happen when calling the method)- I need to first cast it to string (string)($cuid)
. Think this could be made a bit more obvious in the docs- as a lot of people could be expecting a pure string from that method.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid schedule: 'Invalid schedule: Failed to parse "schedule:daily"'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.