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 ($k === $key) { continue; } if (false !== stripos($k, $key)) { unset($baseTags[$key]); } } } print_r($baseTags);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.07 ms | 2901 KiB | 10 Q