3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ['foo', 'bar']; var_dump($data); $filtered = array_filter($data, function (&$value) { $value = (bool) $value; return true; }); var_dump($filtered);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bERrp
function name:  (null)
number of ops:  14
compiled vars:  !0 = $data, !1 = $filtered
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    7     4        INIT_FCALL                                               'array_filter'
          5        SEND_VAR                                                 !0
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FbERrp%3A7%240'
   11     7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
    7     9        ASSIGN                                                   !1, $5
   13    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FbERrp%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bERrp
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        BOOL                                             ~1      !0
          2        ASSIGN                                                   !0, ~1
   10     3      > RETURN                                                   <true>
   11     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FbERrp%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.07 ms | 1399 KiB | 17 Q