3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $values = array( 'product1' => 10 , 'product2' => 15 , 'product3' => 14); echo array_keys($array, max($array));
based on hkHkq
Output for 5.6.0 - 7.3.0alpha1
Notice: Undefined variable: array in /in/8LjDZ on line 11 Notice: Undefined variable: array in /in/8LjDZ on line 11 Warning: max(): When only one parameter is given, it must be an array in /in/8LjDZ on line 11 Warning: array_keys() expects parameter 1 to be array, null given in /in/8LjDZ on line 11