3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1, 3, 5, 3, 7]; //[1, 3, 5, 3, 4] $sortedArr = $arr; sort($sortedArr); $filtered = array_filter( array_map(function($v1, $v2){ return ($v1 == $v2 ?FALSE:TRUE); }, $arr, $sortedArr) ); var_dump(count($filtered) > 2 ? FALSE : TRUE);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lES9X
function name:  (null)
number of ops:  25
compiled vars:  !0 = $arr, !1 = $sortedArr, !2 = $filtered
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                                               'array_filter'
    8     6        INIT_FCALL                                               'array_map'
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FlES9X%3A8%240'
   10     8        SEND_VAL                                                 ~6
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                         $8      
    7    14        ASSIGN                                                   !2, $8
   13    15        INIT_FCALL                                               'var_dump'
         16        COUNT                                            ~10     !2
         17        IS_SMALLER                                               2, ~10
         18      > JMPZ                                                     ~11, ->21
         19    >   QM_ASSIGN                                        ~12     <false>
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~12     <true>
         22    >   SEND_VAL                                                 ~12
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FlES9X%3A8%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lES9X
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $v1, !1 = $v2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        IS_EQUAL                                                 !0, !1
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      <false>
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      <true>
          7    > > RETURN                                                   ~3
   10     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FlES9X%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.19 ms | 1400 KiB | 21 Q