3v4l.org

run code in 500+ PHP versions simultaneously
<?php $oldContact = array( 'name' => 'Joeahkd', 'address' => '123 Masjdhfin', 'city' => 'Spring', 'state' => 'CA', 'zip' => '90101', ); $newContact = array( 'name' => 'Joe', 'address' => '123 Main St', 'city' => 'Springville', 'state' => 'CA', 'zip' => '90101', ); $oldDiff = []; $newDiff = []; foreach ($oldContact as $key => $value) { if ($value !== $newContact[$key]) { $oldDiff[$key] = $value; $newDiff[$key] = $newContact[$key]; } } echo "Old Diff: " . var_export($oldDiff, true) . "\n"; echo "New Diff: " . var_export($newDiff, true);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/kak49
function name:  (null)
number of ops:  31
compiled vars:  !0 = $oldContact, !1 = $newContact, !2 = $oldDiff, !3 = $newDiff, !4 = $value, !5 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   11     1        ASSIGN                                                       !1, <array>
   19     2        ASSIGN                                                       !2, <array>
   20     3        ASSIGN                                                       !3, <array>
   21     4      > FE_RESET_R                                           $10     !0, ->16
          5    > > FE_FETCH_R                                           ~11     $10, !4, ->16
          6    >   ASSIGN                                                       !5, ~11
   22     7        FETCH_DIM_R                                          ~13     !1, !5
          8        IS_NOT_IDENTICAL                                             !4, ~13
          9      > JMPZ                                                         ~14, ->15
   23    10    >   ASSIGN_DIM                                                   !2, !5
         11        OP_DATA                                                      !4
   24    12        FETCH_DIM_R                                          ~17     !1, !5
         13        ASSIGN_DIM                                                   !3, !5
         14        OP_DATA                                                      ~17
   21    15    > > JMP                                                          ->5
         16    >   FE_FREE                                                      $10
   28    17        INIT_FCALL                                                   'var_export'
         18        SEND_VAR                                                     !2
         19        SEND_VAL                                                     <true>
         20        DO_ICALL                                             $18     
         21        CONCAT                                               ~19     'Old+Diff%3A+', $18
         22        CONCAT                                               ~20     ~19, '%0A'
         23        ECHO                                                         ~20
   29    24        INIT_FCALL                                                   'var_export'
         25        SEND_VAR                                                     !3
         26        SEND_VAL                                                     <true>
         27        DO_ICALL                                             $21     
         28        CONCAT                                               ~22     'New+Diff%3A+', $21
         29        ECHO                                                         ~22
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.12 ms | 1886 KiB | 14 Q