79191896

Date: 2024-11-15 10:10:24
Score: 1
Natty:
Report link

The easy and safe solution that nobody mentioned would be

$firstItem = '';
foreach($object as $item) {
  $firstItem = $item;
  break;
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: iranimij