3v4l.org

run code in 300+ PHP versions simultaneously
<?php $msg_prefixes_to_delete = array('Eilmeldung:', 'Eilmeldung', '+EIL+'); $message = 'Eilmeldung Es geht los'; foreach ($msg_prefixes_to_delete as $delete) { if (strncmp($message, $delete, strlen($delete))) { echo strlen($delete); $message = trim(substr($message, strlen($delete))); } } var_dump($message);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 22
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/BKRGl
function name:  (null)
number of ops:  28
compiled vars:  !0 = $msg_prefixes_to_delete, !1 = $message, !2 = $delete
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'Eilmeldung+Es+geht+los'
    5     2      > FE_RESET_R                                       $5      !0, ->23
          3    > > FE_FETCH_R                                               $5, !2, ->23
    6     4    >   INIT_FCALL                                               'strncmp'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        STRLEN                                           ~6      !2
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10      > JMPZ                                                     $7, ->22
    7    11    >   STRLEN                                           ~8      !2
         12        ECHO                                                     ~8
    8    13        INIT_FCALL                                               'trim'
         14        INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !1
         16        STRLEN                                           ~9      !2
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !1, $11
    5    22    > > JMP                                                      ->3
         23    >   FE_FREE                                                  $5
   12    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.4 ms | 1396 KiB | 21 Q