3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pages = [ 'a' => ['title' => 'A'], 'c' => ['title' => 'C'], 'b' => ['title' => 'B'], 'n' => ['title' => '.N'], ]; array_multisort($pages, SORT_ASC, SORT_STRING, array_map(fn($page) => preg_replace('_^[^0-9a-z]*_', '', strtolower($page['title'])), $pages)); echo implode(', ', array_map(fn($page) => $page['title'], $pages));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QFdlv
function name:  (null)
number of ops:  23
compiled vars:  !0 = $pages
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'array_multisort'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 4
          4        SEND_VAL                                                 2
          5        INIT_FCALL                                               'array_map'
          6        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          7        SEND_VAL                                                 ~2
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $3      
         10        SEND_VAL                                                 $3
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'implode'
         13        SEND_VAL                                                 '%2C+'
         14        INIT_FCALL                                               'array_map'
         15        DECLARE_LAMBDA_FUNCTION                          ~5      [1]
         16        SEND_VAL                                                 ~5
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $6      
         19        SEND_VAR                                                 $6
         20        DO_ICALL                                         $7      
         21        ECHO                                                     $7
         22      > 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/QFdlv
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $page
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '_%5E%5B%5E0-9a-z%5D%2A_'
          3        SEND_VAL                                                 ''
          4        INIT_FCALL                                               'strtolower'
          5        FETCH_DIM_R                                      ~1      !0, 'title'
          6        SEND_VAL                                                 ~1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10      > RETURN                                                   $3
         11*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QFdlv
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $page
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        FETCH_DIM_R                                      ~1      !0, 'title'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.9 ms | 1019 KiB | 18 Q