3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paintings = [ ["24ef9-70076-4358c-48386.jpg", "La Donna Gravida", "649"], ["a7972-065a9-4c0f9-723d1.jpg", "Madonna and Child with the Book", "1254"], ["b054c-df208-0f600-e884e.jpg", "Madonna del Granduca", "1457"] ]; $painting = 'a7972-065a9-4c0f9-723d1.jpg'; $index = array_find_key( $paintings, fn($row) => $row[0] === $painting ); if ($index !== null) { unset($paintings[$index]); } var_export($paintings);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/qO6Zv
function name:  (null)
number of ops:  16
compiled vars:  !0 = $paintings, !1 = $painting, !2 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 'a7972-065a9-4c0f9-723d1.jpg'
   10     2        INIT_FCALL_BY_NAME                                       'array_find_key'
   11     3        SEND_VAR_EX                                              !0
   12     4        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          5        BIND_LEXICAL                                             ~5, !1
   13     6        SEND_VAL_EX                                              ~5
   10     7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !2, $6
   14     9        TYPE_CHECK                                  1020          !2
         10      > JMPZ                                                     ~8, ->12
   15    11    >   UNSET_DIM                                                !0, !2
   17    12    >   INIT_FCALL                                               'var_export'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > 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/qO6Zv
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $row, !1 = $painting
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        FETCH_DIM_R                                      ~2      !0, 0
          3        IS_IDENTICAL                                     ~3      !1, ~2
          4      > RETURN                                                   ~3
   13     5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.04 ms | 1014 KiB | 15 Q