3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function significant_number($string){ $offset=9; $string=substr($string, $offset); $count=strlen($string); $i=0; while($i < $count){ if(ctype_digit($string[$i])) { break; } $i++; } return $string[$i]; } $udid="086786dc4ae78dbf6a6a9b621b5ae4"; $md5udid=md5($udid); $sigNo=significant_number($udid); $testudid=substr($md5udid, 4, sigNo).substr($udid, sigNo, 6); echo $testudid; ?>
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Use of undefined constant sigNo - assumed 'sigNo' in /in/skqVA on line 21 Warning: substr() expects parameter 3 to be integer, string given in /in/skqVA on line 21 Notice: Use of undefined constant sigNo - assumed 'sigNo' in /in/skqVA on line 21 Warning: substr() expects parameter 2 to be integer, string given in /in/skqVA on line 21
Output for 5.3.0 - 5.6.28
Notice: Use of undefined constant sigNo - assumed 'sigNo' in /in/skqVA on line 21 Warning: substr() expects parameter 3 to be long, string given in /in/skqVA on line 21 Notice: Use of undefined constant sigNo - assumed 'sigNo' in /in/skqVA on line 21 Warning: substr() expects parameter 2 to be long, string given in /in/skqVA on line 21
Output for 4.3.0 - 5.2.17
Notice: Use of undefined constant sigNo - assumed 'sigNo' in /in/skqVA on line 21 Notice: Use of undefined constant sigNo - assumed 'sigNo' in /in/skqVA on line 21 086786