PHP BUG FIX - 10 min fix

Job ID: 35517323

Budget: $10 – $30 USD

View the instructions in the attached image, to fix this code below.

***********************

<?php

function getTimestampsByDescription(string $xml, string $description) : array
{
return [];
}

$xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<log>
<event timestamp="1614285589">
<description>Intrusion detected</description>
</event>
<event timestamp="1614286432">
<description>Intrusion ended</description>
</event>
</log>
XML;
print_r(getTimestampsByDescription($xml, 'Intrusion ended'));
Related categories: PHP XML MySQL