3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [1, 2, 3, 4]; foreach (1 ? $a : [] as &$x) { $x += 10; } print_r($a); $a = [1, 2, 3, 4]; $true = 1; foreach ($true ? $a : [] as &$x) { $x += 10; } print_r($a);