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);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 37
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 37
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 27
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 27
Branch analysis from position: 11
2 jumps found. (Code = 47) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 36
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 36
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 23
Branch analysis from position: 27
Branch analysis from position: 27
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/HMfdH
function name:  (null)
number of ops:  42
compiled vars:  !0 = $array, !1 = $result, !2 = $brieftitles, !3 = $arr, !4 = $foundtitle, !5 = $title, !6 = $btitle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   68     1        ASSIGN                                                   !1, <array>
   69     2        ASSIGN                                                   !2, <array>
   70     3      > FE_RESET_R                                       $10     !0, ->37
          4    > > FE_FETCH_R                                               $10, !3, ->37
   71     5    >   ASSIGN                                                   !4, <false>
   72     6        FETCH_DIM_R                                      ~12     !3, 'BriefTitle'
          7        FETCH_DIM_R                                      ~13     ~12, 0
          8        ASSIGN                                                   !5, ~13
   73     9      > FE_RESET_R                                       $15     !2, ->27
         10    > > FE_FETCH_R                                               $15, !6, ->27
   74    11    >   INIT_FCALL                                               'stripos'
         12        SEND_VAR                                                 !5
         13        SEND_VAR                                                 !6
         14        DO_ICALL                                         $16     
         15        TYPE_CHECK                                  1018  ~17     $16
         16      > JMPNZ_EX                                         ~17     ~17, ->23
         17    >   INIT_FCALL                                               'stripos'
         18        SEND_VAR                                                 !6
         19        SEND_VAR                                                 !5
         20        DO_ICALL                                         $18     
         21        TYPE_CHECK                                  1018  ~19     $18
         22        BOOL                                             ~17     ~19
         23    >   ASSIGN                                                   !4, ~17
   75    24      > JMPZ                                                     !4, ->26
         25    > > JMP                                                      ->27
   73    26    > > JMP                                                      ->10
         27    >   FE_FREE                                                  $15
   77    28        BOOL_NOT                                         ~21     !4
         29      > JMPZ                                                     ~21, ->36
   78    30    >   ASSIGN_DIM                                               !1
         31        OP_DATA                                                  !3
   79    32        FETCH_DIM_R                                      ~24     !3, 'BriefTitle'
         33        FETCH_DIM_R                                      ~25     ~24, 0
         34        ASSIGN_DIM                                               !2
         35        OP_DATA                                                  ~25
   70    36    > > JMP                                                      ->4
         37    >   FE_FREE                                                  $10
   82    38        INIT_FCALL                                               'print_r'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.32 ms | 1011 KiB | 15 Q