3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userdb = [ [ '100', 'Sandra', 'urlof100' ], [ '5465', 'Stefanie', 'urlof5465' ], [ '40489', 'Michael', 'urlof40489' ] ]; array_walk($userdb, function($e,$i) { if (in_array("Sandra",$e)) { $k = array_search('Sandra',$e); echo "Yes, \"Sandra\" is in array at row $i and column $k\n"; } });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tRME0
function name:  (null)
number of ops:  7
compiled vars:  !0 = $userdb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtRME0%3A20%240'
   25     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtRME0%3A20%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/tRME0
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $e, !1 = $i, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   21     2        INIT_FCALL                                               'in_array'
          3        SEND_VAL                                                 'Sandra'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->18
   22     7    >   INIT_FCALL                                               'array_search'
          8        SEND_VAL                                                 'Sandra'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !2, $4
   23    12        ROPE_INIT                                     5  ~7      'Yes%2C+%22Sandra%22+is+in+array+at+row+'
         13        ROPE_ADD                                      1  ~7      ~7, !1
         14        ROPE_ADD                                      2  ~7      ~7, '+and+column+'
         15        ROPE_ADD                                      3  ~7      ~7, !2
         16        ROPE_END                                      4  ~6      ~7, '%0A'
         17        ECHO                                                     ~6
   25    18    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtRME0%3A20%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.81 ms | 1396 KiB | 19 Q