3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = ' [2] => TRUE'; $value = preg_replace("/\s+\[(\d+)\]\s+=>/", " $1 =>", $value); echo $value;
based on Jr9Lh
Output for 4.3.0 - 7.1.0
2 => TRUE