3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Dummy { function __construct($input = array(1,2,3)) { $this->input = $input; } function run() { foreach($this->input as $key=>$value) { if($key == 2) throw new Exception(); } } } new Dummy;
Output for 5.3.7 - 7.1.7