3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $now = 1; $id = 0; $x = ($id == true) || (($data['created'] = $now) == true); var_dump($x, $data); $id = 1; $now = 2; $x = ($id == true) || (($data['created'] = $now) == true); var_dump($x, $data);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(true) array(1) { ["created"]=> int(1) } bool(true) array(1) { ["created"]=> int(1) }