3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack=array( array("Term"=>"VATEXEMPT","EN"=>"Customer's declaration for VAT relief.","NL"=>" Verklaring van de klant voor BTW-vrijstelling."), array("Term"=>"VAT_LABEL","EN"=>"VAT Relief.","NL"=>" BTW verlichting."), array("Term"=>"PLEASE_SELECT","EN"=>"Please Select Accordingly.","NL"=>"Selecteer alstublieft."), array("Term"=>"CONFIRM","EN"=>"Yes. I confirm statement.","NL"=>"Ja. ik bevestig de verklaring."), array("Term"=>"DENIED","EN"=>"No. I'm not chronically sick or disabled.","NL"=>"Nee. ik ben niet chronisch ziek of gehandicapt."), array("Term"=>"BIRTHDAY_LBL","EN"=>"Birthday.","NL"=>"Geboortedag."), array("Term"=>"BIRTHDAY","EN"=>"You must be older than 12 years!.","NL"=>"Je moet ouder zijn dan 12 jaar!."), array("Term"=>"FirstName","EN"=>"Your first name.","NL"=>"Jouw voornaam."), array("Term"=>"LastName","EN"=>"Your last name.","NL"=>"Jouw achternaam."), array("Term"=>"FEMALE","EN"=>"Female.","NL"=>" Vrouw."), array("Term"=>"MALE","EN"=>"Male.","NL"=>" Man."), array("Term"=>"OTHER","EN"=>"Other.","NL"=>" Anders."), array("Term"=>"GENDER","EN"=>"Gender.","NL"=>" Geslacht."), array("Term"=>"SURVEY_LBL","EN"=>"May we contact you?.","NL"=>" Mogen we contact met u opnemen?."), array("Term"=>"SURVEY_DESC","EN"=>"I would like to get some feedback on the Medication vest and if you have any suggestions for improvement..","NL"=>" Ik zou graag wat feedback krijgen over het medicatie-vest en of je suggesties voor verbetering hebt."), array("Term"=>"PHONE_CONTACT","EN"=>"Yes. by phone.","NL"=>" Ja. telefonisch."), array("Term"=>"EMAIL_CONTACT","EN"=>"Yes. by email.","NL"=>" Ja. per e-mail."), array("Term"=>"CONTACT_NO","EN"=>"No. don't contact me.","NL"=>" Nee. neem geen contact met mij op."), array("Term"=>"SUBSCRIBE","EN"=>"Subscribe me for Discount and News.","NL"=>" Abonneer me voor korting en nieuws."), array("Term"=>"FAV_COL","EN"=>"Favourite colour.","NL"=>" Favoriete kleur."), array("Term"=>"FAV_COL_DESC","EN"=>"Your favourite colour for the Medication Vest.","NL"=>" Je favoriete kleur voor het medicatie-vest."), array("Term"=>"BLACK","EN"=>"Black.","NL"=>" Zwart."), array("Term"=>"WHITE","EN"=>"White.","NL"=>"Wit."), array("Term"=>"GREY","EN"=>"Grey.","NL"=>" Grijs."), array("Term"=>"DARKBLUE","EN"=>"Dark Blue.","NL"=>" Donker blauw."), array("Term"=>"SKIN","EN"=>"Skin tone.","NL"=>" Huidskleur."), array("Term"=>"NOT_LISTED","EN"=>"Not listed.","NL"=>" Staat er niet bij."), array("Term"=>"PROFILE_IMG","EN"=>"Profile Picture.","NL"=>" Profielfoto."), array("Term"=>"PROFILE_IMG_DESC","EN"=>"Paste your link to your online profile picture.","NL"=>" Plak je link naar je online profielfoto."), array("Term"=>"YES","EN"=>"Yes.","NL"=>" Ja."), array("Term"=>"NO","EN"=>"No.","NL"=>" Nee.") ); function shapeSpace_search_array($needle, $haystack) { if (in_array($needle, $haystack)) { return true; } foreach ($haystack as $item) { if (is_array($item) && search_array($needle, $item)) return true; } return false; } if (shapeSpace_search_array('CONTACT_NO', $haystack)) { echo 'Yep, the $value was found in the $array'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/vbHcI
function name:  (null)
number of ops:  8
compiled vars:  !0 = $haystack
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   50     1        INIT_FCALL                                               'shapespace_search_array'
          2        SEND_VAL                                                 'CONTACT_NO'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5      > JMPZ                                                     $2, ->7
   51     6    >   ECHO                                                     'Yep%2C+the+%24value+was+found+in+the+%24array'
   52     7    > > RETURN                                                   1

Function shapespace_search_array:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 17
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/vbHcI
function name:  shapeSpace_search_array
number of ops:  24
compiled vars:  !0 = $needle, !1 = $haystack, !2 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   38     2        INIT_FCALL                                               'in_array'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->8
   39     7    > > RETURN                                                   <true>
   42     8    > > FE_RESET_R                                       $4      !1, ->21
          9    > > FE_FETCH_R                                               $4, !2, ->21
   43    10    >   TYPE_CHECK                                  128  ~5      !2
         11      > JMPZ_EX                                          ~5      ~5, ->17
         12    >   INIT_FCALL_BY_NAME                                       'search_array'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0  $6      
         16        BOOL                                             ~5      $6
         17    > > JMPZ                                                     ~5, ->20
   44    18    >   FE_FREE                                                  $4
         19      > RETURN                                                   <true>
   42    20    > > JMP                                                      ->9
         21    >   FE_FREE                                                  $4
   47    22      > RETURN                                                   <false>
   49    23*     > RETURN                                                   null

End of function shapespace_search_array

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.55 ms | 1403 KiB | 16 Q