3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(int $id): string { $baseId = (int) ($id / 120); return sprintf('%02d/%02d/', $baseId % 100, \intdiv($baseId, 100) % 100); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E0Vh1
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E0Vh1
function name:  test
number of ops:  19
compiled vars:  !0 = $id, !1 = $baseId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        DIV                                              ~2      !0, 120
          2        CAST                                          4  ~3      ~2
          3        ASSIGN                                                   !1, ~3
    5     4        INIT_FCALL                                               'sprintf'
          5        SEND_VAL                                                 '%2502d%2F%2502d%2F'
          6        MOD                                              ~5      !1, 100
          7        SEND_VAL                                                 ~5
          8        INIT_FCALL                                               'intdiv'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 100
         11        DO_ICALL                                         $6      
         12        MOD                                              ~7      $6, 100
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                         $8      
         15        VERIFY_RETURN_TYPE                                       $8
         16      > RETURN                                                   $8
    6    17*       VERIFY_RETURN_TYPE                                       
         18*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.41 ms | 1088 KiB | 15 Q