3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $extraString = 'a:16:{s:5:\"items\";s:65:\"1|Oinment\n2|Powder\n3|Lotion\nTablets|Tablets\nCapsule|Capsule\n\";s:8:\"multiple\";b:0;s:6:\"aslist\";b:1;s:12:\"empty_option\";s:0:\"\";s:7:\"optrand\";i:0;s:12:\"other_option\";N;s:10:\"other_text\";s:8:\"Other...\";s:13:\"title_display\";s:6:\"before\";s:11:\"description\";s:0:\"\";s:11:\"custom_keys\";i:1;s:14:\"options_source\";s:0:\"\";s:7:\"private\";i:0;s:8:\"analysis\";b:1;s:5:\"value\";s:1:\"1\";s:11:\"css_classes\";s:0:\"\";s:15:\"wrapper_classes\";s:0:\"\";}'; $keysValuesArray = preg_split("/[;]/", $extraString, -1, PREG_SPLIT_NO_EMPTY); //print_r($keysValuesArray); $itemsKey = preg_grep("/"items"/" ,$keysValuesArray); //print_r($keysValuesArray[0]); print_r($itemsKey); ?>
based on Ebmok
Output for 7.0.0
Parse error: syntax error, unexpected 'items' (T_STRING), expecting ',' or ')' in /in/nF3Qb on line 8
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Parse error: syntax error, unexpected 'items' (T_STRING) in /in/nF3Qb on line 8
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/nF3Qb on line 8
Process exited with code 255.