3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'Google', 'Facebook', 'Twitters', 'Slack', 'Twilio', ); $r = null; array_walk($array, function($v, $k) use (&$r){ $r[$v] = strlen($v); }); echo array_search(max($r), $r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71ZFf
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, null
   11     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F71ZFf%3A11%240'
          5        BIND_LEXICAL                                             ~4, !1
   13     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   14     8        INIT_FCALL                                               'array_search'
          9        INIT_FCALL                                               'max'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        ECHO                                                     $7
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F71ZFf%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/71ZFf
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v, !1 = $k, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   12     3        STRLEN                                           ~4      !0
          4        ASSIGN_DIM                                               !2, !0
          5        OP_DATA                                                  ~4
   13     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F71ZFf%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.74 ms | 1395 KiB | 19 Q