3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = [ ['email' => 'oldemail@email.com', 'state' => 'IL'], ['email' => 'diditwork@email.com', 'state' => 'HI'], ]; $jobs = [ ['title' => 'Marketing Coordinator', 'location' => 'Chicago', 'state' => 'IL'], ['title' => 'Sales Manager (MA)', 'location' => 'Springfield', 'state' => 'IL'], ['title' => 'Security Guard/Driver', 'location' => 'Big Island', 'state' => 'HI'], ['title' => 'Directory of Sales and Operation Planning', 'location' => 'Honolulu', 'state' => 'HI'], ]; foreach ($jobs as $job) { $jobs_by_state[$job['state']][] = $job; } foreach ($users as &$user) { $user['jobs'] = $jobs_by_state[$user['state']]; } echo json_encode($users, JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
2 jumps found. (Code = 125) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 126) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 9
filename:       /in/hSY4G
function name:  (null)
number of ops:  24
compiled vars:  !0 = $users, !1 = $jobs, !2 = $job, !3 = $jobs_by_state, !4 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   17     2      > FE_RESET_R                                       $7      !1, ->9
          3    > > FE_FETCH_R                                               $7, !2, ->9
   18     4    >   FETCH_DIM_R                                      ~8      !2, 'state'
          5        FETCH_DIM_W                                      $9      !3, ~8
          6        ASSIGN_DIM                                               $9
          7        OP_DATA                                                  !2
   17     8      > JMP                                                      ->3
          9    >   FE_FREE                                                  $7
   20    10      > FE_RESET_RW                                      $11     !0, ->17
         11    > > FE_FETCH_RW                                              $11, !4, ->17
   21    12    >   FETCH_DIM_R                                      ~13     !4, 'state'
         13        FETCH_DIM_R                                      ~14     !3, ~13
         14        ASSIGN_DIM                                               !4, 'jobs'
         15        OP_DATA                                                  ~14
   20    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $11
   25    18        INIT_FCALL                                               'json_encode'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 128
         21        DO_ICALL                                         $15     
         22        ECHO                                                     $15
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.57 ms | 1396 KiB | 15 Q