3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_last_dot_occurence ($url ) { $fullArray = explode('.', $url); $newArray; switch (count($fullArray)) { case 1: $newArray = $url; break; case 2: $newArray = array("string1" => $fullArray[0], "string2" => $fullArray[1]); break; default: break; } return $newArray; } get_last_dot_occurence("test.com");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DOucY
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'get_last_dot_occurence'
          1        SEND_VAL                                                 'test.com'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function get_last_dot_occurence:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
filename:       /in/DOucY
function name:  get_last_dot_occurence
number of ops:  24
compiled vars:  !0 = $url, !1 = $fullArray, !2 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '.'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        COUNT                                            ~5      !1
    6     7        CASE                                                     ~5, 1
          8      > JMPNZ                                                    ~6, ->12
   10     9    >   CASE                                                     ~5, 2
         10      > JMPNZ                                                    ~6, ->14
         11    > > JMP                                                      ->20
    7    12    >   ASSIGN                                                   !2, !0
    8    13      > JMP                                                      ->21
   11    14    >   FETCH_DIM_R                                      ~8      !1, 0
         15        INIT_ARRAY                                       ~9      ~8, 'string1'
         16        FETCH_DIM_R                                      ~10     !1, 1
         17        ADD_ARRAY_ELEMENT                                ~9      ~10, 'string2'
         18        ASSIGN                                                   !2, ~9
   12    19      > JMP                                                      ->21
   15    20    > > JMP                                                      ->21
         21    >   FREE                                                     ~5
   17    22      > RETURN                                                   !2
   18    23*     > RETURN                                                   null

End of function get_last_dot_occurence

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.97 ms | 1399 KiB | 16 Q