3v4l.org

run code in 300+ PHP versions simultaneously
<?php $customData = "===== description ===== Description test"; $arr = preg_split('#={5}\s+([^=]+)\s+={5}#', $customData, -1, PREG_SPLIT_DELIM_CAPTURE); $data = array(); for ($i=1, $l=sizeof($arr); $i<$l; $i+=2) { echo trim($arr[$i]) } //print_r($arr);
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/TZnJ7 on line 9
Process exited with code 255.

preferences:
185.1 ms | 1395 KiB | 63 Q