3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Tracking { function __construct($client_id) {} function createIdent($charcount) { $ident = null; $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $x = 0; while ($x <= $charcount) { $ident .= substr($chars, mt_rand(0, strlen($chars) - 1), 1); $x++; } return $ident; } } $tracking = new Tracking(1477); echo $tracking->createIdent(7);

preferences:
32.7 ms | 402 KiB | 5 Q