3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expected = [ 'foo1', 'foo2', 'foo3', 'foo4', 'foo5', 'foo6', 'foo7', 'foo8', 'foo9', 'foo10', 'foo11', ]; $array = array_fill(0, 100, $expected); array_walk($array, 'sort'); var_export( array_filter( $array, fn($row) => $row !== $expected // only keep rows which are sorted incorrectly ) );

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rWYXd
function name:  (null)
number of ops:  21
compiled vars:  !0 = $expected, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   16     1        INIT_FCALL                                               'array_fill'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 100
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
   18     7        INIT_FCALL                                               'array_walk'
          8        SEND_REF                                                 !1
          9        SEND_VAL                                                 'sort'
         10        DO_ICALL                                                 
   20    11        INIT_FCALL                                               'var_export'
   21    12        INIT_FCALL                                               'array_filter'
   22    13        SEND_VAR                                                 !1
   23    14        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
         15        BIND_LEXICAL                                             ~6, !0
   24    16        SEND_VAL                                                 ~6
   21    17        DO_ICALL                                         $7      
   24    18        SEND_VAR                                                 $7
   20    19        DO_ICALL                                                 
   25    20      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rWYXd
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $row, !1 = $expected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        IS_NOT_IDENTICAL                                 ~2      !0, !1
          3      > RETURN                                                   ~2
   24     4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.49 ms | 1013 KiB | 17 Q