3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function revert($str) { $revertStr = ''; foreach ($obtainStrList as $obtainStr) { $revertStr .= ' '; for ($i = 1; $i < mb_strlen($obtainStr) + 1; $i++) { $revertStr .= mb_substr($obtainStr, -$i, 1); } } return $revertStr; } //echo revert('Delivery Club, ZakaZaka'); var_dump(preg_match_all('/\w+/', $str, $obtainStrList));
based on hZbQV
Output for 5.6.30, hhvm-3.21.3, 7.0.30 - 7.3.0rc3
Notice: Undefined variable: str in /in/HSDn8 on line 19 int(0)
Output for hhvm-3.22.0
Notice: Undefined variable: str in /in/HSDn8 on line -1 int(0)
Output for hhvm-3.18.5
Notice: Undefined variable: str in /in/HSDn8 on line 19 Warning: preg_match_all() expects parameter 2 to be string, null given in /in/HSDn8 on line 19 NULL