3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function SplitEmailAddress($email) { $result = array(); list($result['user'], $result['domain']) = explode('@', $email); return $result; } $arr = SplitEmailAddress('myuser_1@mailserver.example.com'); var_dump($arr);
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { ["user"]=> string(8) "myuser_1" ["domain"]=> string(22) "mailserver.example.com" }
Output for 4.3.0 - 5.6.25
array(2) { ["domain"]=> string(22) "mailserver.example.com" ["user"]=> string(8) "myuser_1" }