3v4l.org

run code in 300+ PHP versions simultaneously
<?php $desired_services = array( array( 'job_service.service_id' => 51000071, 'job_service.site_id' => '100000002', ), array( 'job_service.service_id' => 51000075, 'job_service.site_id' => '100000002', ), array( 'job_service.service_id' => 51026110, 'job_service.site_id' => '100000002', ), ); $existing_services = array( array( 'job_service.service_id' => 51026110, 'job_service.site_id' => null, ), array( 'job_service.service_id' => 51000075, 'job_service.site_id' => null, ), array( 'job_service.service_id' => 51000071, 'job_service.site_id' => null, ), ); $new_services = array_udiff($desired_services, $existing_services, function ($left, $right) { $service_diff = $left[JobServicePeer::SERVICE_ID] - $left[JobServicePeer::SERVICE_ID]; if ($service_diff !== 0) { return $service_diff; } $site_diff = $left[JobServicePeer::SITE_ID] - $left[JobServicePeer::SITE_ID]; return $site_diff; }); var_dump($desired_services, $existing_services, $new_services); die();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/nBR2o
function name:  (null)
number of ops:  16
compiled vars:  !0 = $desired_services, !1 = $existing_services, !2 = $new_services
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, <array>
   33     2        INIT_FCALL                                               'array_udiff'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FnBR2o%3A33%240'
   40     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
   33     8        ASSIGN                                                   !2, $6
   41     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   42    14      > EXIT                                                     
         15*     > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FnBR2o%3A33%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nBR2o
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $left, !1 = $right, !2 = $service_diff, !3 = $site_diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   34     2        FETCH_CLASS_CONSTANT                             ~4      'JobServicePeer', 'SERVICE_ID'
          3        FETCH_DIM_R                                      ~5      !0, ~4
          4        FETCH_CLASS_CONSTANT                             ~6      'JobServicePeer', 'SERVICE_ID'
          5        FETCH_DIM_R                                      ~7      !0, ~6
          6        SUB                                              ~8      ~5, ~7
          7        ASSIGN                                                   !2, ~8
   35     8        IS_NOT_IDENTICAL                                         !2, 0
          9      > JMPZ                                                     ~10, ->11
   36    10    > > RETURN                                                   !2
   38    11    >   FETCH_CLASS_CONSTANT                             ~11     'JobServicePeer', 'SITE_ID'
         12        FETCH_DIM_R                                      ~12     !0, ~11
         13        FETCH_CLASS_CONSTANT                             ~13     'JobServicePeer', 'SITE_ID'
         14        FETCH_DIM_R                                      ~14     !0, ~13
         15        SUB                                              ~15     ~12, ~14
         16        ASSIGN                                                   !3, ~15
   39    17      > RETURN                                                   !3
   40    18*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FnBR2o%3A33%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.85 ms | 1400 KiB | 17 Q