3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myfunction_key($a,$b) { if ($a===$b) { return 0; } return ($a>$b)?1:-1; } function myfunction_value($a,$b) { if ($a===$b) { return 0; } return ($a>$b)?1:-1; } $a1=array("a"=>"red","b"=>"green","c"=>"blue"); $a2=array("a"=>"red","b"=>"green","c"=>"green"); $result=array_udiff_uassoc($a1,$a2,"myfunction_value"); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5LgDj
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a1, !1 = $a2, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, <array>
   21     1        ASSIGN                                                   !1, <array>
   23     2        INIT_FCALL                                               'array_udiff_uassoc'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 'myfunction_value'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
   24     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function myfunction_key:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
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/5LgDj
function name:  myfunction_key
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        IS_IDENTICAL                                             !0, !1
          3      > JMPZ                                                     ~2, ->5
    6     4    > > RETURN                                                   0
    8     5    >   IS_SMALLER                                               !1, !0
          6      > JMPZ                                                     ~3, ->9
          7    >   QM_ASSIGN                                        ~4      1
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~4      -1
         10    > > RETURN                                                   ~4
    9    11*     > RETURN                                                   null

End of function myfunction_key

Function myfunction_value:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
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/5LgDj
function name:  myfunction_value
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        IS_IDENTICAL                                             !0, !1
          3      > JMPZ                                                     ~2, ->5
   15     4    > > RETURN                                                   0
   17     5    >   IS_SMALLER                                               !1, !0
          6      > JMPZ                                                     ~3, ->9
          7    >   QM_ASSIGN                                        ~4      1
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~4      -1
         10    > > RETURN                                                   ~4
   18    11*     > RETURN                                                   null

End of function myfunction_value

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.41 ms | 1400 KiB | 17 Q