3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $C= new stdClass(); $C->AUTO_HASHTAG = array("test", "test me"); 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 5.0.0 - 7.1.0
array ( 0 => 'test', 1 => 'test me', 2 => 'test-me', 3 => 'test_me', )
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/O0Pan on line 6
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/O0Pan on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/O0Pan on line 6
Process exited with code 255.