3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all_works = [ ["title"=>"A Children’s Story", "year"=>"2024"], ["title"=>"Occurred during the Day", "year"=>"2021"], ["title"=>"Future and Past", "year"=>"2021"], ["title"=>"Future and History", "year"=>"2020"], ["title"=>"Open the School, Close the Studio", "year"=>"2023"], ["title"=>"To Reconstruct, To Rebuild", "year"=>"2024"], ["title"=>"Eyeglasses, a Story", "year"=>"2023"], ["title"=>"Nomadic Life11", "year"=>"2024"], ["title"=>"Nomadic Life2", "year"=>"2024"], ["title"=>"Nomadic Life", "year"=>"2024"], ["title"=>"Chipotle!", "year"=>"2022"], ["title"=>"between Art & Technology", "year"=>"2020"], ["title"=>"interview Script", "year"=>"2018"], ["title"=>"memories and confession", "year"=>"2024"], ["title"=>"Guest of Pluto", "year"=>"2022"], ["title"=>"A Prologue", "year"=>"2022"], ["title"=>"You are in this place", "year"=>"2023"], ["title"=>"Happening Now", "year"=>"2024"], ["title"=>"Review Catalogue", "year"=>"2022"], ["title"=>"A living being of Mars", "year"=>"2021"], ]; usort($all_works, fn($a, $b) => $b['year'] <=> $a['year'] ?: strnatcmp($a["title"], $b["title"])); var_export($all_works);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IqLi0
function name:  (null)
number of ops:  10
compiled vars:  !0 = $all_works
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   26     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   28     6        INIT_FCALL                                               'var_export'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IqLi0
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !1, 'year'
          3        FETCH_DIM_R                                      ~3      !0, 'year'
          4        SPACESHIP                                        ~4      ~2, ~3
          5        JMP_SET                                          ~5      ~4, ->13
          6        INIT_FCALL                                               'strnatcmp'
          7        FETCH_DIM_R                                      ~6      !0, 'title'
          8        SEND_VAL                                                 ~6
          9        FETCH_DIM_R                                      ~7      !1, 'title'
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                         $8      
         12        QM_ASSIGN                                        ~5      $8
         13      > RETURN                                                   ~5
         14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.25 ms | 1012 KiB | 16 Q