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/vrp92 on line 13
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/vrp92 on line 19
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 137.
Output for 5.4.0 - 5.4.9, 5.5.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/vrp92 on line 11
Process exited with code 255.
Output for 5.3.11 - 5.3.29, 5.4.10 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 18 bytes) in /in/vrp92 on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.10
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/vrp92 on line 11
Process exited with code 255.
Output for 5.2.10 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 18 bytes) in /in/vrp92 on line 13
Process exited with code 255.
Output for 5.2.6 - 5.2.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/vrp92 on line 13
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 71 bytes) in /in/vrp92 on line 13
Process exited with code 255.
Output for 5.0.0 - 5.2.1
array ( 0 => 'جام جهانی', 1 => 'فیفا2014', 2 => 'جآم جهآنی', 3 => 'جام-جهانی', 4 => 'جام_جهانی', 5 => 'فیفآ2014', )
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/vrp92 on line 9
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/vrp92 on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/vrp92 on line 9
Process exited with code 255.