3v4l.org

run code in 300+ PHP versions simultaneously
<?php function makeSymbolicNotation(string $symbolicModes) { switch (true) { case (ctype_xdigit($symbolicModes)): $symbolicModes = hexdec($symbolicModes); case (is_numeric($symbolicModes)): if (! decoct(octdec($symbolicModes)) == $symbolicModes) { $symbolicModes = decoct((integer) $symbolicModes); } return 'numeric'; //return getSymbolicNotationFromOctal($symbolicModes); default: $triads = explode(',', $symbolicModes); foreach ($triads as $triad) { if (! preg_match('/^([ugo]*)([\+=-])([rwxst]+|[\-])$/i', $triad, $matches)) { trigger_error("Invalid symbol format ($symbolicModes)."); return "------"; } var_dump($matches); } } } $notation = makeSymbolicNotation('+r');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KM0oE
function name:  (null)
number of ops:  5
compiled vars:  !0 = $notation
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_FCALL                                               'makesymbolicnotation'
          1        SEND_VAL                                                 '%2Br'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Function makesymbolicnotation:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 77) Position 1 = 35, Position 2 = 55
Branch analysis from position: 35
2 jumps found. (Code = 78) Position 1 = 36, Position 2 = 55
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 51
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
Branch analysis from position: 28
filename:       /in/KM0oE
function name:  makeSymbolicNotation
number of ops:  57
compiled vars:  !0 = $symbolicModes, !1 = $triads, !2 = $triad, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'ctype_xdigit'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4      > JMPNZ                                                    $5, ->10
    9     5    >   INIT_FCALL                                               'is_numeric'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8      > JMPNZ                                                    $6, ->14
          9    > > JMP                                                      ->29
    8    10    >   INIT_FCALL                                               'hexdec'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !0, $7
   10    14    >   INIT_FCALL                                               'decoct'
         15        INIT_FCALL                                               'octdec'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $9      
         18        SEND_VAR                                                 $9
         19        DO_ICALL                                         $10     
         20        BOOL_NOT                                         ~11     $10
         21        IS_EQUAL                                                 !0, ~11
         22      > JMPZ                                                     ~12, ->28
   11    23    >   INIT_FCALL                                               'decoct'
         24        CAST                                          4  ~13     !0
         25        SEND_VAL                                                 ~13
         26        DO_ICALL                                         $14     
         27        ASSIGN                                                   !0, $14
   13    28    > > RETURN                                                   'numeric'
   16    29    >   INIT_FCALL                                               'explode'
         30        SEND_VAL                                                 '%2C'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $16     
         33        ASSIGN                                                   !1, $16
   17    34      > FE_RESET_R                                       $18     !1, ->55
         35    > > FE_FETCH_R                                               $18, !2, ->55
   18    36    >   INIT_FCALL                                               'preg_match'
         37        SEND_VAL                                                 '%2F%5E%28%5Bugo%5D%2A%29%28%5B%5C%2B%3D-%5D%29%28%5Brwxst%5D%2B%7C%5B%5C-%5D%29%24%2Fi'
         38        SEND_VAR                                                 !2
         39        SEND_REF                                                 !3
         40        DO_ICALL                                         $19     
         41        BOOL_NOT                                         ~20     $19
         42      > JMPZ                                                     ~20, ->51
   19    43    >   INIT_FCALL                                               'trigger_error'
         44        ROPE_INIT                                     3  ~22     'Invalid+symbol+format+%28'
         45        ROPE_ADD                                      1  ~22     ~22, !0
         46        ROPE_END                                      2  ~21     ~22, '%29.'
         47        SEND_VAL                                                 ~21
         48        DO_ICALL                                                 
   20    49        FE_FREE                                                  $18
         50      > RETURN                                                   '------'
   22    51    >   INIT_FCALL                                               'var_dump'
         52        SEND_VAR                                                 !3
         53        DO_ICALL                                                 
   17    54      > JMP                                                      ->35
         55    >   FE_FREE                                                  $18
   25    56      > RETURN                                                   null

End of function makesymbolicnotation

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.6 ms | 1403 KiB | 32 Q