3v4l.org

run code in 300+ PHP versions simultaneously
<?php $msg_prefixes_to_delete = array('Eilmeldung:', 'Eilmeldung', '+EIL+'); $message = '+EIL+Eilmeldung Es geht los'; foreach ($msg_prefixes_to_delete as $delete) { if (substr($message, 0, strlen($delete)) === $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 = 22
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/PWJFG
function name:  (null)
number of ops:  27
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, '%2BEIL%2BEilmeldung+Es+geht+los'
    5     2      > FE_RESET_R                                       $5      !0, ->22
          3    > > FE_FETCH_R                                               $5, !2, ->22
    6     4    >   INIT_FCALL                                               'substr'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 0
          7        STRLEN                                           ~6      !2
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        IS_IDENTICAL                                             !2, $7
         11      > JMPZ                                                     ~8, ->21
    7    12    >   INIT_FCALL                                               'trim'
         13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !1
         15        STRLEN                                           ~9      !2
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                         $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !1, $11
    5    21    > > JMP                                                      ->3
         22    >   FE_FREE                                                  $5
   11    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.25 ms | 1396 KiB | 19 Q