3v4l.org

run code in 300+ PHP versions simultaneously
<?php unset($params['id']); $params['visible'] = true; // $originalData = array(); $originalData['visible'] = false; $changes = array_diff($params, $originalData); print_r($params); print_r($originalData); if (!$changes || !count($changes)) { print_r($changes); die('Not change'); return; } print_r($changes); die('change');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 21
filename:       /in/FemdQ
function name:  (null)
number of ops:  32
compiled vars:  !0 = $params, !1 = $originalData, !2 = $changes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   UNSET_DIM                                                !0, 'id'
    4     1        ASSIGN_DIM                                               !0, 'visible'
          2        OP_DATA                                                  <true>
    6     3        ASSIGN_DIM                                               !1, 'visible'
          4        OP_DATA                                                  <false>
    8     5        INIT_FCALL                                               'array_diff'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !2, $5
    9    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   10    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   12    16        BOOL_NOT                                         ~9      !2
         17      > JMPNZ_EX                                         ~9      ~9, ->21
         18    >   COUNT                                            ~10     !2
         19        BOOL_NOT                                         ~11     ~10
         20        BOOL                                             ~9      ~11
         21    > > JMPZ                                                     ~9, ->27
   13    22    >   INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
   14    25      > EXIT                                                     'Not+change'
   15    26*       RETURN                                                   null
   17    27    >   INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
   18    30      > EXIT                                                     'change'
         31*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.64 ms | 1396 KiB | 17 Q