3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1,3,5,3,7]; $sortedArr = $arr; sort($sortedArr); var_dump(count(array_intersect_assoc($arr, $sortedArr)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SQDGS
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr, !1 = $sortedArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, !0
    5     2        INIT_FCALL                                               'sort'
          3        SEND_REF                                                 !1
          4        DO_ICALL                                                 
    7     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'array_intersect_assoc'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10        COUNT                                            ~6      $5
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.8 ms | 1398 KiB | 19 Q