3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); $values = ['true', false]; $needle = true; $inArray = array_reduce($values, function ($inArray, $value) use ($needle) { return $inArray || $value === $needle; }); var_dump(in_array(true, $values)); var_dump($inArray);
based on meEBR
Output for hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.2.6
bool(true) bool(false)
Output for 5.6.0 - 5.6.30
Warning: Unsupported declare 'strict_types' in /in/aq3a2 on line 3 bool(true) bool(false)