3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = '📣shfdgkj fdsgjkhfgkj'; $body1 = preg_replace('(^(:mega:|📣))', '', $body); var_dump($body1); $megas = [':mega:', '📣']; foreach ($megas as $mega) { if (strpos($body, $mega) === 0) { $body2 = substr($body, strlen($mega)); break; } } var_dump($body2);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 27
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 27
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 27
Branch analysis from position: 27
filename:       /in/WUcVv
function name:  (null)
number of ops:  32
compiled vars:  !0 = $body, !1 = $body1, !2 = $megas, !3 = $mega, !4 = $body2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%F0%9F%93%A3shfdgkj+fdsgjkhfgkj'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%28%5E%28%3Amega%3A%7C%F0%9F%93%A3%29%29'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    9    10        ASSIGN                                                   !2, <array>
   10    11      > FE_RESET_R                                       $10     !2, ->27
         12    > > FE_FETCH_R                                               $10, !3, ->27
   11    13    >   INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $11     
         17        IS_IDENTICAL                                             $11, 0
         18      > JMPZ                                                     ~12, ->26
   12    19    >   INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !0
         21        STRLEN                                           ~13     !3
         22        SEND_VAL                                                 ~13
         23        DO_ICALL                                         $14     
         24        ASSIGN                                                   !4, $14
   13    25      > JMP                                                      ->27
   10    26    > > JMP                                                      ->12
         27    >   FE_FREE                                                  $10
   17    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !4
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.68 ms | 1396 KiB | 21 Q