3v4l.org

run code in 500+ PHP versions simultaneously
<?php $staff_json= '[ { "id":5, "firstname":"Joel ", "lastname":"Abase", "displayName":"Abase, Joel ", "officeId":3, "officeName":"Birmingham", "isLoanOfficer":true, "isActive":true }, { "id":1, "firstname":"Precious ", "lastname":"Love", "displayName":"Love, Precious ", "officeId":4, "officeName":"Manchester", "isLoanOfficer":true, "isActive":true }, { "id":2, "firstname":"Bernard ", "lastname":"Aikins", "displayName":"Aikins, Bernice ", "officeId":2, "officeName":"Manchester", "isLoanOfficer":false, "isActive":true }, { "id":8, "firstname":"Kwame", "lastname":"Joseph", "displayName":"Joseph, Kwame", "officeId":2, "officeName":"Manchester", "isLoanOfficer":true, "isActive":true, "joiningDate":[ 2018, 5, 1 ] }, { "id":4, "firstname":"Janine ", "lastname":"Hayden", "displayName":"Hayden, Janine ", "officeId":1, "officeName":"Head Office", "isLoanOfficer":false, "isActive":true }, { "id":6, "firstname":"Esther", "lastname":"Monroe", "displayName":"Monroe, Esther", "officeId":2, "officeName":"London", "isLoanOfficer":true, "isActive":true, "joiningDate":[ 2017, 11, 1 ] } ]'; $temp_staff = json_decode($staff_json, true); $temp_staff = array_filter($temp_staff, function($x){ return $x["isLoanOfficer"] === true; } ); var_dump($temp_staff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I80N1
function name:  (null)
number of ops:  16
compiled vars:  !0 = $staff_json, !1 = $temp_staff
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%5B++%0A+++%7B++%0A++++++%22id%22%3A5%2C%0A++++++%22firstname%22%3A%22Joel+%22%2C%0A++++++%22lastname%22%3A%22Abase%22%2C%0A++++++%22displayName%22%3A%22Abase%2C+Joel+%22%2C%0A++++++%22officeId%22%3A3%2C%0A++++++%22officeName%22%3A%22Birmingham%22%2C%0A++++++%22isLoanOfficer%22%3Atrue%2C%0A++++++%22isActive%22%3Atrue%0A+++%7D%2C%0A+++%7B++%0A++++++%22id%22%3A1%2C%0A++++++%22firstname%22%3A%22Precious+%22%2C%0A++++++%22lastname%22%3A%22Love%22%2C%0A++++++%22displayName%22%3A%22Love%2C+Precious+%22%2C%0A++++++%22officeId%22%3A4%2C%0A++++++%22officeName%22%3A%22Manchester%22%2C%0A++++++%22isLoanOfficer%22%3Atrue%2C%0A++++++%22isActive%22%3Atrue%0A+++%7D%2C%0A+++%7B++%0A++++++%22id%22%3A2%2C%0A++++++%22firstname%22%3A%22Bernard+%22%2C%0A++++++%22lastname%22%3A%22Aikins%22%2C%0A++++++%22displayName%22%3A%22Aikins%2C+Bernice+%22%2C%0A++++++%22officeId%22%3A2%2C%0A++++++%22officeName%22%3A%22Manchester%22%2C%0A++++++%22isLoanOfficer%22%3Afalse%2C%0A++++++%22isActive%22%3Atrue%0A+++%7D%2C%0A+++%7B++%0A++++++%22id%22%3A8%2C%0A++++++%22firstname%22%3A%22Kwame%22%2C%0A++++++%22lastname%22%3A%22Joseph%22%2C%0A++++++%22displayName%22%3A%22Joseph%2C+Kwame%22%2C%0A++++++%22officeId%22%3A2%2C%0A++++++%22officeName%22%3A%22Manchester%22%2C%0A++++++%22isLoanOfficer%22%3Atrue%2C%0A++++++%22isActive%22%3Atrue%2C%0A++++++%22joiningDate%22%3A%5B++%0A+++++++++2018%2C%0A+++++++++5%2C%0A+++++++++1%0A++++++%5D%0A+++%7D%2C%0A+++%7B++%0A++++++%22id%22%3A4%2C%0A++++++%22firstname%22%3A%22Janine+%22%2C%0A++++++%22lastname%22%3A%22Hayden%22%2C%0A++++++%22displayName%22%3A%22Hayden%2C+Janine+%22%2C%0A++++++%22officeId%22%3A1%2C%0A++++++%22officeName%22%3A%22Head+Office%22%2C%0A++++++%22isLoanOfficer%22%3Afalse%2C%0A++++++%22isActive%22%3Atrue%0A+++%7D%2C%0A+++%7B++%0A++++++%22id%22%3A6%2C%0A++++++%22firstname%22%3A%22Esther%22%2C%0A++++++%22lastname%22%3A%22Monroe%22%2C%0A++++++%22displayName%22%3A%22Monroe%2C+Esther%22%2C%0A++++++%22officeId%22%3A2%2C%0A++++++%22officeName%22%3A%22London%22%2C%0A++++++%22isLoanOfficer%22%3Atrue%2C%0A++++++%22isActive%22%3Atrue%2C%0A++++++%22joiningDate%22%3A%5B++%0A+++++++++2017%2C%0A+++++++++11%2C%0A+++++++++1%0A++++++%5D%0A+++%7D%0A%5D'
   75     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                             $3      
          5        ASSIGN                                                       !1, $3
   76     6        INIT_FCALL                                                   'array_filter'
          7        SEND_VAR                                                     !1
          8        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   78     9        SEND_VAL                                                     ~5
   76    10        DO_ICALL                                             $6      
         11        ASSIGN                                                       !1, $6
   81    12        INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                                     
         15      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I80N1
function name:  {closure:/in/I80N1:76}
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   76     0  E >   RECV                                                 !0      
   77     1        FETCH_DIM_R                                          ~1      !0, 'isLoanOfficer'
          2        TYPE_CHECK                                        8  ~2      ~1
          3      > RETURN                                                       ~2
   78     4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.12 ms | 2457 KiB | 16 Q