3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $promocoesDinamicas = [ 1618 => 'BlackFridayDinamica/18: MilkShake P SP', 1619 => 'BlackFridayDinamica/18: 2 MilkShake M SP', 1620 => 'BlackFridayDinamica/18: Big Bob M SP', 1621 => 'BlackFridayDinamica/18: Cheddar M SP', 1622 => 'BlackFridayDinamica/18: Trio Cheddar M SP', 1623 => 'BlackFridayDinamica/18: Bob\'s Twister SP', 1624 => 'BlackFridayDinamica/18: Trio Big Bob Picanha P SP', ]; $keys = array_keys($promocoesDinamicas); $mod = 7 % count($keys); $id = (int)350417 % $mod; var_dump($keys, $mod, $id);
Output for 7.3.0rc3
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/A7mjI:14 Stack trace: #0 {main} thrown in /in/A7mjI on line 14
Process exited with code 255.