3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timeslotsToTimeline(array $timeslots):array { return array_reduce( $timeslots, function($result, $timeslot) { [$start, $result[$start]] = sscanf(str_replace(':', '', $timeslot), "%d-%d"); return $result; }, [] ); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/46ChD
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

Function timeslotstotimeline:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/46ChD
function name:  timeslotsToTimeline
number of ops:  11
compiled vars:  !0 = $timeslots
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'array_reduce'
    6     2        SEND_VAR                                                 !0
    7     3        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
   10     4        SEND_VAL                                                 ~1
   11     5        SEND_VAL                                                 <array>
    5     6        DO_ICALL                                         $2      
   11     7        VERIFY_RETURN_TYPE                                       $2
          8      > RETURN                                                   $2
   13     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/46ChD
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $result, !1 = $timeslot, !2 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_FCALL                                               'sscanf'
          3        INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 '%3A'
          5        SEND_VAL                                                 ''
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        SEND_VAL                                                 '%25d-%25d'
         10        DO_ICALL                                         $4      
         11        FETCH_LIST_R                                     $5      $4, 0
         12        ASSIGN                                                   !2, $5
         13        FETCH_LIST_R                                     $7      $4, 1
         14        ASSIGN_DIM                                               !0, !2
         15        OP_DATA                                                  $7
         16        FREE                                                     $4
    9    17      > RETURN                                                   !0
   10    18*     > RETURN                                                   null

End of Dynamic Function 0

End of function timeslotstotimeline

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.12 ms | 1003 KiB | 16 Q