3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data['meta'] = array('parameter' => 'jo', 'irgendwas' => 'so'); $data['id'] = 'dsoifjdsf:dsfoijdsoi:dofds'; $mapping = explode(':', $data['id'], 1); $data['meta'] = array_merge($data['meta'], array('parameter' => reset($mapping))); var_dump($mapping);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(1) { [0]=> string(26) "dsoifjdsf:dsfoijdsoi:dofds" }