3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Tracking { function __construct($client) { } function generateID($length) { $id = $client; $x = 0; while ($x < $length) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789'; $id .= substr($chars, mt_rand(0, strlen($chars) - 1), 1); } return $id; } } $parcel = new Tracking(1426); echo $parcel->generateID(20);
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: client in /in/6180K on line 10
Process exited with code 137.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: client in /in/6180K on line 10
Process exited with code 137.