3v4l.org

run code in 300+ PHP versions simultaneously
<?php $baseTags = array( 'Bob' => 2, 'Theresa' => 3, 'The farm house' => 2, 'Bob at the farm house' => 1, ); foreach ($baseTags as $key => $count) { foreach ($baseTags as $ k=> $c) { if (false !== stripos($k,$key)) { unset($baseTags[$key]); } } } print_r($baseTags);
Output for 5.4.0 - 5.4.8
Parse error: syntax error, unexpected 'k' (T_STRING), expecting variable (T_VARIABLE) or '$' in SjVlP on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.18
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in SjVlP on line 12
Process exited with code 255.

preferences:
170.85 ms | 1395 KiB | 35 Q