3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [ 'foo', 'bar', 'bazz' ]; $b = $a; foreach ( $a as &$value ) { var_dump( current( $a ) ); }
Output for 7.0.0 - 7.3.0beta1
string(3) "foo" string(3) "foo" string(3) "foo"
Output for 5.5.0 - 5.6.30, hhvm-3.12.14 - 3.17.3
string(3) "bar" string(4) "bazz" bool(false)