3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.2.18, 8.3.5 - 8.3.7
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16777224 bytes) in /in/2osaB on line 16
Process exited with code 255.
Output for 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Out of memory (allocated 27267072 bytes) (tried to allocate 8388616 bytes) in /in/2osaB on line 14 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.1, 8.1.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/2osaB on line 16
Process exited with code 255.
Output for 8.1.2 - 8.1.27
Fatal error: Out of memory (allocated 31461376) (tried to allocate 16777224 bytes) in /in/2osaB on line 14 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 8.0.13
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 67108872 bytes) in /in/2osaB on line 14
Process exited with code 255.
Output for 7.1.10

Process exited with code 137.
Output for 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/2osaB on line 16
Process exited with code 255.
Output for 5.3.11 - 5.3.29, 5.4.0 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 18 bytes) in /in/2osaB on line 16
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/2osaB on line 16
Process exited with code 255.
Output for 5.2.6, 5.2.10 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 18 bytes) in /in/2osaB on line 14
Process exited with code 255.
Output for 5.2.7 - 5.2.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/2osaB on line 14
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/2osaB on line 14
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.1
array ( 0 => 'جام جهانی', 1 => 'فیفا2014', 2 => 'فیفا', 3 => 'تیم ملی', 4 => 'برزیل', 5 => 'جآم جهآنی', 6 => 'جام-جهانی', 7 => 'جام_جهانی', 8 => 'فیفآ2014', 9 => 'فیفآ', 10 => 'تیم-ملی', 11 => 'تیم_ملی', )
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/2osaB on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /in/2osaB on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/2osaB on line 12
Process exited with code 255.

preferences:
231.51 ms | 401 KiB | 316 Q