3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr1 = array('green', 'blue', 'cyan1'); // blue cyan1 green $arr2 = array('yellow', 'red', 'cyan2'); // cyan2 red yellow $i = 1; function print_elements($e1, $e2) { global $i; $r = substr($e1, 0, 4) <=> substr($e2, 0, 4); echo "$i. $e1 <=> $e2 == $r\n"; $i++; return $r; } print_r(array_uintersect($arr1, $arr2, 'print_elements'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgodV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    6     2        ASSIGN                                                       !2, 1
   15     3        INIT_FCALL                                                   'print_r'
          4        INIT_FCALL                                                   'array_uintersect'
          5        SEND_VAR                                                     !0
          6        SEND_VAR                                                     !1
          7        SEND_VAL                                                     'print_elements'
          8        DO_ICALL                                             $6      
          9        SEND_VAR                                                     $6
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Function print_elements:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgodV
function name:  print_elements
number of ops:  21
compiled vars:  !0 = $e1, !1 = $e2, !2 = $i, !3 = $r
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    8     2        BIND_GLOBAL                                                  !2, 'i'
    9     3        FRAMELESS_ICALL_3                substr              ~4      !0, 0
          4        OP_DATA                                                      4
          5        FRAMELESS_ICALL_3                substr              ~5      !1, 0
          6        OP_DATA                                                      4
          7        SPACESHIP                                            ~6      ~4, ~5
          8        ASSIGN                                                       !3, ~6
   10     9        ROPE_INIT                                         8  ~9      !2
         10        ROPE_ADD                                          1  ~9      ~9, '.+'
         11        ROPE_ADD                                          2  ~9      ~9, !0
         12        ROPE_ADD                                          3  ~9      ~9, '+%3C%3D%3E+'
         13        ROPE_ADD                                          4  ~9      ~9, !1
         14        ROPE_ADD                                          5  ~9      ~9, '+%3D%3D+'
         15        ROPE_ADD                                          6  ~9      ~9, !3
         16        ROPE_END                                          7  ~8      ~9, '%0A'
         17        ECHO                                                         ~8
   11    18        PRE_INC                                                      !2
   12    19      > RETURN                                                       !3
   13    20*     > RETURN                                                       null

End of function print_elements

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
152.38 ms | 2111 KiB | 15 Q