3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mystrcasecmp($a, $b) { return strcasecmp($a, $b) ? true : false; } $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_uintersect_assoc($array1, $array2, "mystrcasecmp")); echo "\n---\n"; print_r(array_uintersect($array1, $array2, "mystrcasecmp"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V5lAk
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   11     2        INIT_FCALL                                               'print_r'
          3        INIT_FCALL                                               'array_uintersect_assoc'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 'mystrcasecmp'
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
   13    10        ECHO                                                     '%0A---%0A'
   15    11        INIT_FCALL                                               'print_r'
         12        INIT_FCALL                                               'array_uintersect'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'mystrcasecmp'
         16        DO_ICALL                                         $6      
         17        SEND_VAR                                                 $6
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function mystrcasecmp:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V5lAk
function name:  mystrcasecmp
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'strcasecmp'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6      > JMPZ                                                     $2, ->9
          7    >   QM_ASSIGN                                        ~3      <true>
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~3      <false>
         10    > > RETURN                                                   ~3
    5    11*     > RETURN                                                   null

End of function mystrcasecmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.92 ms | 1401 KiB | 21 Q