3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo solve("360-e54-168-a1a-32a-400-183-29a-bcd-98a-bf5-af5"); function solve(string $quest):string{ $randTab=explode("-",$quest); if(count($randTab)!==8){ throw new \LogicException("not 8 randTab's (".count($randTab).")"); } foreach($randTab as $i=>$wut){ if(!is_numeric($wut)){ throw new \LogicException("randTab {$i} is not numeric! wtf?"); } } $goodSum=$randTab[0]*$randTab[0]*11+$randTab[1]*121+$randTab[2]*$randTab[1]*27+$randTab[3]*23+$randTab[4]*15+$randTab[5]*$randTab[6]*$randTab[7]*11-$randTab[3]*($randTab[5]+$randTab[4]); $goodSum%=100000000; $buf2=hash("md5",(string)$goodSum,false); return $buf2; }
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.15, 8.5.0
Fatal error: Uncaught LogicException: not 8 randTab's (12) in /in/G3Tet:8 Stack trace: #0 /in/G3Tet(2): solve('360-e54-168-a1a...') #1 {main} thrown in /in/G3Tet on line 8
Process exited with code 255.

preferences:
55.87 ms | 406 KiB | 5 Q