3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test = 'جام جهانی فیفا2014 فیفا تیم ملی برزیل کامرون مکزیک کرواسی اسپانیا شیلی'; $arr = explode("\n",$test); $C= new stdClass(); $C->AUTO_HASHTAG = $arr; foreach($C->AUTO_HASHTAG as &$ht){ if(strpos($ht,'ا')!==false) $C->AUTO_HASHTAG[] = str_replace('ا','آ',$ht); if(strpos($ht,'آ')!==false) $C->AUTO_HASHTAG[] = str_replace('آ','ا',$ht); if(strpos($ht,' ')!==false){ $C->AUTO_HASHTAG[] = str_replace(' ','-',$ht); $C->AUTO_HASHTAG[] = str_replace(' ','_',$ht); } } var_export($C->AUTO_HASHTAG);
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/eqcpS on line 21
Process exited with code 255.
Output for hhvm-3.12.0
mallctl opt.prof: No such file or directory (2) Fatal error: request has exceeded memory limit in /in/eqcpS on line 27
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: request has exceeded memory limit in /in/eqcpS on line 27
Process exited with code 255.
Output for 5.4.0 - 5.6.21
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/eqcpS on line 19
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 18 bytes) in /in/eqcpS on line 19
Process exited with code 255.
Output for 5.2.6 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/eqcpS on line 21
Process exited with code 255.
Output for 5.2.2 - 5.2.5
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 18 bytes) in /in/eqcpS on line 21
Process exited with code 255.
Output for 5.0.0 - 5.2.1
array ( 0 => 'جام جهانی', 1 => 'فیفا2014', 2 => 'فیفا', 3 => 'تیم ملی', 4 => 'برزیل', 5 => 'کامرون', 6 => 'مکزیک', 7 => 'کرواسی', 8 => 'اسپانیا', 9 => 'شیلی', 10 => 'جآم جهآنی', 11 => 'جام-جهانی', 12 => 'جام_جهانی', 13 => 'فیفآ2014', 14 => 'فیفآ', 15 => 'تیم-ملی', 16 => 'تیم_ملی', 17 => 'کآمرون', 18 => 'کروآسی', 19 => 'آسپآنیآ', )
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/eqcpS on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /in/eqcpS on line 17
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/eqcpS on line 17
Process exited with code 255.