3v4l.org

run code in 300+ PHP versions simultaneously
<?php $endpoint = array( "mac_address"=>"989096e255a1", "status" =>"Known", "attributes" => array( "Owner"=>"rogue@wpi.edu", "IPAM-Hostname"=>"dresden.wpi.edu", "IPAM-AdminState"=>"OK", "IPAM-NAS-IP-Address"=>"0", "IPAM-NAS-Port-ID"=>"1", "IPAM-RADIUS-VLAN"=>"0", "IPAM-TimeStamp"=>"2017-07-11 11:18:33 EDT", "Guest Role ID"=>"false", "MAC-Auth Expiry"=>"1", "Username"=>"", ), "Username"=>"", ); $endpointcreate = array_filter($endpoint, function($var) {return !(($var=='') || isnull($var));}); $endpointcreate["attributes"] = array_filter($endpointcreate["attributes"], function($var) {return !empty($var);}); print_r($endpointcreate);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ETPrJ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $endpoint, !1 = $endpointcreate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FETPrJ%3A21%240'
          4        SEND_VAL                                                 ~3
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   22     7        INIT_FCALL                                               'array_filter'
          8        FETCH_DIM_R                                      ~7      !1, 'attributes'
          9        SEND_VAL                                                 ~7
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FETPrJ%3A22%241'
         11        SEND_VAL                                                 ~8
         12        DO_ICALL                                         $9      
         13        ASSIGN_DIM                                               !1, 'attributes'
         14        OP_DATA                                                  $9
   25    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FETPrJ%3A21%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/ETPrJ
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        IS_EQUAL                                         ~1      !0, ''
          2      > JMPNZ_EX                                         ~1      ~1, ->7
          3    >   INIT_FCALL_BY_NAME                                       'isnull'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $2      
          6        BOOL                                             ~1      $2
          7    >   BOOL_NOT                                         ~3      ~1
          8      > RETURN                                                   ~3
          9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FETPrJ%3A21%240

Function %00%7Bclosure%7D%2Fin%2FETPrJ%3A22%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ETPrJ
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        ISSET_ISEMPTY_CV                                 ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FETPrJ%3A22%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.02 ms | 1400 KiB | 17 Q