3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function chinese_date($timestamp, $output_delimiter = ' '){ $info_arr = explode(' ',date('Y m d H i s',strtotime('now'))); return implode($output_delimiter, array_map(function($v,$k){ echo $k.'-'.$v.'|'; return $v; }, $info_arr, array_keys($info_arr))); } echo chinese_date('now');
based on v6YUO
Output for 5.3.0 - 7.2.0
0-2015|1-03|2-31|3-12|4-07|5-22|2015 03 31 12 07 22
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/UKTcB on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/UKTcB on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/UKTcB on line 5
Process exited with code 255.