3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(0,null,3,null); function is_not_null ($var) { return !is_null($var); } $filtered = array_filter($arr, 'is_not_null'); print_r($filtered);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CKrYO
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr, !1 = $filtered
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'is_not_null'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    8     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function is_not_null:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CKrYO
function name:  is_not_null
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        TYPE_CHECK                                    2  ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function is_not_null

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.77 ms | 1445 KiB | 15 Q