3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public function abc(){ return 'asd'; } } function myfunction_value($a,$b) { var_dump($a->abc());die; if ($a===$b) { return 0; } return ($a>$b)?1:-1; } $c = new A(); $a1=array("a"=>$c,"b"=>"green","c"=>"blue"); $a2=array("a"=>"red","b"=>"green","c"=>"green"); $result=array_udiff_assoc($a1,$a2,"myfunction_value");die; print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/FQKYH
function name:  (null)
number of ops:  19
compiled vars:  !0 = $c, !1 = $a1, !2 = $a2, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $4      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   20     3        INIT_ARRAY                                       ~7      !0, 'a'
          4        ADD_ARRAY_ELEMENT                                ~7      'green', 'b'
          5        ADD_ARRAY_ELEMENT                                ~7      'blue', 'c'
          6        ASSIGN                                                   !1, ~7
   21     7        ASSIGN                                                   !2, <array>
   23     8        INIT_FCALL                                               'array_udiff_assoc'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        SEND_VAL                                                 'myfunction_value'
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !3, $10
         14      > EXIT                                                     
   24    15*       INIT_FCALL                                               'print_r'
         16*       SEND_VAR                                                 !3
         17*       DO_ICALL                                                 
         18*     > RETURN                                                   1

Function myfunction_value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/FQKYH
function name:  myfunction_value
number of ops:  18
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_FCALL                                               'var_dump'
          3        INIT_METHOD_CALL                                         !0, 'abc'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > EXIT                                                     
   13     8*       IS_IDENTICAL                                             !0, !1
          9*       JMPZ                                                     ~4, ->11
   15    10*       RETURN                                                   0
   17    11*       IS_SMALLER                                               !1, !0
         12*       JMPZ                                                     ~5, ->15
         13*       QM_ASSIGN                                        ~6      1
         14*       JMP                                                      ->16
         15*       QM_ASSIGN                                        ~6      -1
         16*       RETURN                                                   ~6
   18    17*     > RETURN                                                   null

End of function myfunction_value

Class A:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FQKYH
function name:  abc
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'asd'
    7     1*     > RETURN                                                   null

End of function abc

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.54 ms | 1400 KiB | 19 Q