3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( array( "users" => array( "email" => "test@yahoo.com ,testuser@yahoo.com" , "username" => "test,testuser", "description" => "description1,description2" ), ), array( "users" => array( "email" => "test@yahaaaoo.com ,testuser@yaaaahoo.com" , "username" => "tedddst,teddddtuser", "description" => "descr222iption1,des222cription2" ), ) ); foreach($array as $users) { foreach($users as &$value) { $users['users']["email"] = explode(",", $value['email']); $users['users']["username"] = explode(",", $value['username']); $users['users']["description"] = explode(",", $value['description']); } } print_r($value);
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [email] => Array ( [0] => test@yahaaaoo.com [1] => testuser@yaaaahoo.com ) [username] => Array ( [0] => tedddst [1] => teddddtuser ) [description] => Array ( [0] => descr222iption1 [1] => des222cription2 ) )
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/pvTYW on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /in/pvTYW on line 24
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/pvTYW on line 24
Process exited with code 255.