3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* WT-Pine-Blush-0-short-rentwithtryon-Alias */ $_itemSku = "WT-Pine-Blush-0-short-rentwithtryon-Alias"; preg_match('/([^-]+\-){6}([^-]+)$/', $_itemSku, $matches); $result = (isset($matches[2])) ? $matches[2] : false; if ($result) { preg_match('/([a-z][A-Z])/', $result, $alias); $arr = explode('', $alias); //TODO: need to insert a space between the two items in the alias array echo $alias; } else { echo "nope"; }
Output for 5.4.0 - 7.2.0
Warning: explode() expects parameter 2 to be string, array given in /in/oU70d on line 10 Notice: Array to string conversion in /in/oU70d on line 12 Array
Output for 5.3.1 - 5.3.29
Warning: explode() expects parameter 2 to be string, array given in /in/oU70d on line 10 Array
Output for 5.2.5 - 5.3.0
Notice: Array to string conversion in /in/oU70d on line 10 Warning: explode(): Empty delimiter in /in/oU70d on line 10 Array
Output for 4.3.2 - 5.2.4
Notice: Array to string conversion in /in/oU70d on line 10 Warning: explode(): Empty delimiter. in /in/oU70d on line 10 Array
Output for 4.3.0 - 4.3.1
Notice: Array to string conversion in /in/oU70d on line 10 Warning: explode() [http://www.php.net/function.explode]: Empty delimiter. in /in/oU70d on line 10 Array