3v4l.org

run code in 500+ PHP versions simultaneously
<?php $myWondersArray = array ( 0 => (object) array( 'currentUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 3 - Helping Mom (Part 1/3)', 'currentUnitPart' => 'wonderskills/starter_book_2/unit_3_helping_mom/part_1/', ), 1 => (object) array( 'currentUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 3 - Helping Mom (Part 2/3)', 'currentUnitPart' => 'wonderskills/starter_book_2/unit_3_helping_mom/part_2/', ), 2 => (object) array( 'currentUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 3 - Helping Mom (Part 3/3)', 'currentUnitPart' => 'wonderskills/starter_book_2/unit_3_helping_mom/part_3/', ), 3 => (object) array( 'previousUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 2 - Sid\'s New Neighbors (Part 1/3)', 'previousUnitPart' => 'wonderskills/starter_book_2/unit_2_sids_new_neighbors/part_1/', ), 4 => (object) array( 'previousUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 2 - Sid\'s New Neighbors (Part 2/3)', 'previousUnitPart' => 'wonderskills/starter_book_2/unit_2_sids_new_neighbors/part_2/', ), 5 => (object) array( 'previousUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 2 - Sid\'s New Neighbors (Part 3/3)', 'previousUnitPart' => 'wonderskills/starter_book_2/unit_2_sids_new_neighbors/part_3/', ), 6 => (object) array( 'nextUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 4 - Food from the Garden (Part 1/3)', 'nextUnitPart' => 'wonderskills/starter_book_2/unit_4_food_from_the_garden/part_1/', ), 7 => (object) array( 'nextUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 4 - Food from the Garden (Part 2/3)', 'nextUnitPart' => 'wonderskills/starter_book_2/unit_4_food_from_the_garden/part_2/', ), 8 => (object) array( 'nextUnitDisplay' => 'WonderSkills: Starter Book 2, Unit 4 - Food from the Garden (Part 3/3)', 'nextUnitPart' => 'wonderskills/starter_book_2/unit_4_food_from_the_garden/part_3/', ), ); $buckets = array_fill_keys(['previous', 'current', 'next'], []); foreach ($myWondersArray as $obj) { $buckets[substr(key((array) $obj), 0, -11)][] = $obj; } var_export(array_merge(...array_values($buckets)));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 36
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 36
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/mNpKm
function name:  (null)
number of ops:  48
compiled vars:  !0 = $myWondersArray, !1 = $buckets, !2 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   CAST                                              8  ~3      <array>
          1        INIT_ARRAY                                           ~4      ~3, 0
          2        CAST                                              8  ~5      <array>
          3        ADD_ARRAY_ELEMENT                                    ~4      ~5, 1
          4        CAST                                              8  ~6      <array>
          5        ADD_ARRAY_ELEMENT                                    ~4      ~6, 2
          6        CAST                                              8  ~7      <array>
          7        ADD_ARRAY_ELEMENT                                    ~4      ~7, 3
          8        CAST                                              8  ~8      <array>
          9        ADD_ARRAY_ELEMENT                                    ~4      ~8, 4
         10        CAST                                              8  ~9      <array>
         11        ADD_ARRAY_ELEMENT                                    ~4      ~9, 5
         12        CAST                                              8  ~10     <array>
         13        ADD_ARRAY_ELEMENT                                    ~4      ~10, 6
         14        CAST                                              8  ~11     <array>
         15        ADD_ARRAY_ELEMENT                                    ~4      ~11, 7
         16        CAST                                              8  ~12     <array>
         17        ADD_ARRAY_ELEMENT                                    ~4      ~12, 8
    3    18        ASSIGN                                                       !0, ~4
   51    19        INIT_FCALL                                                   'array_fill_keys'
         20        SEND_VAL                                                     <array>
         21        SEND_VAL                                                     <array>
         22        DO_ICALL                                             $14     
         23        ASSIGN                                                       !1, $14
   52    24      > FE_RESET_R                                           $16     !0, ->36
         25    > > FE_FETCH_R                                                   $16, !2, ->36
   53    26    >   INIT_FCALL                                                   'key'
         27        CAST                                              7  ~17     !2
         28        SEND_VAL                                                     ~17
         29        DO_ICALL                                             $18     
         30        FRAMELESS_ICALL_3                substr              ~19     $18, 0
         31        OP_DATA                                                      -11
         32        FETCH_DIM_W                                          $20     !1, ~19
         33        ASSIGN_DIM                                                   $20
         34        OP_DATA                                                      !2
   52    35      > JMP                                                          ->25
         36    >   FE_FREE                                                      $16
   55    37        INIT_FCALL                                                   'var_export'
         38        INIT_FCALL                                                   'array_merge'
         39        INIT_FCALL                                                   'array_values'
         40        SEND_VAR                                                     !1
         41        DO_ICALL                                             $22     
         42        SEND_UNPACK                                                  $22
         43        CHECK_UNDEF_ARGS                                             
         44        DO_ICALL                                             $23     
         45        SEND_VAR                                                     $23
         46        DO_ICALL                                                     
         47      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
152.97 ms | 1853 KiB | 18 Q