3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( array ( 'Rank' => 422, 'id' => array ( 0 => 152091 ), 'Condition' => array ( 0 => 'Depression', 1 => 'Ketamine' ), 'BriefTitle' => array ( 0 => 'Positron Emission Tomography Assessment of Ketamine Binding of the Serotonin Transporter' ), 'LocationCountry' => array ( 0 => 'Austria' ), 'StartDate' => array ( 0 => 'May 5, 2016' ), 'LastUpdatePostDate' => array ( 0 => 'October 15, 2018' ), 'Entheogen' => 'ketamine', 'Source' => 'clinicaltrials.gov' ), array ( 'Rank' => 6673, 'id' => array ( 0 => 'YSBSZ18291' ), 'Condition' => array ( 0 => 'DepressiveDisorder', 1 => 'Ketamine' ), 'BriefTitle' => array ( 0 => 'Positron Emission Tomography assessment of Ketamine Binding of the Serotonin Transporter and its Relevance for Rapid Antidepressant Response', 1 => 'Die Rolle des Serotonintransporters bei der akuten antidepressiven Wirkung von Ketamin, untersucht mit Positronen-Emissions-Tomographie' ), 'LocationCountry' => array ( 0 => 'Austria' ), 'StartDate' => array ( 0 => '2016 05 01' ), 'LastUpdatePostDate' => array ( 0 => '2018 10 15' ), 'Entheogen' => 'ketamine', 'Source' => 'clinicaltrialsregister.eu' ) ); $result = array(); $brieftitles = array(); foreach ($array as $arr) { $foundtitle = false; $title = $arr['BriefTitle'][0]; foreach ($brieftitles as $btitle) { $foundtitle = (stripos($title, $btitle) !== false) || (stripos($btitle, $title) !== false); if ($foundtitle) break; } if (!$foundtitle) { $result[] = $arr; $brieftitles[] = $arr['BriefTitle'][0]; } } print_r($result);
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
Array ( [0] => Array ( [Rank] => 422 [id] => Array ( [0] => 152091 ) [Condition] => Array ( [0] => Depression [1] => Ketamine ) [BriefTitle] => Array ( [0] => Positron Emission Tomography Assessment of Ketamine Binding of the Serotonin Transporter ) [LocationCountry] => Array ( [0] => Austria ) [StartDate] => Array ( [0] => May 5, 2016 ) [LastUpdatePostDate] => Array ( [0] => October 15, 2018 ) [Entheogen] => ketamine [Source] => clinicaltrials.gov ) )
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
217.84 ms | 408 KiB | 5 Q