3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<TEXT services: {{if die('boom!')}} vrt_providers_<<suffix>>.task_manager.documents_delete: class: Vrt\TaskManagerBundle\Service\Container\DocumentsDeleteTaskContainer arguments: - %vrt_providers_<<suffix>>.task_manager.documents_delete.config% tags: - { name: vrt.task_manager.task, provider: %vrt_providers_<<suffix>>.name% } {{endif}} TEXT; if (preg_match_all('/{{if .+?}}/s', $content, $matches)) { foreach ($matches[0] as $match) { $match = substr($match, 5, -2); $res = false; @eval('$res = (' . $match . ');'); if ($res) { $content = preg_replace('/{{.+?}}/', '', $content, 2); } else { $content = preg_replace('/{{if.+?endif}}/s', '', $content, 1); } } } echo $content;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 40
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 39
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 39
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 31
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 40
filename:       /in/snYMG
function name:  (null)
number of ops:  42
compiled vars:  !0 = $content, !1 = $matches, !2 = $match, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'services%3A%0A%7B%7Bif+die%28%27boom%21%27%29%7D%7D%0A++++vrt_providers_%3C%3Csuffix%3E%3E.task_manager.documents_delete%3A%0A++++++++class%3A+Vrt%5CTaskManagerBundle%5CService%5CContainer%5CDocumentsDeleteTaskContainer%0A++++++++arguments%3A%0A++++++++++++-+%25vrt_providers_%3C%3Csuffix%3E%3E.task_manager.documents_delete.config%25%0A++++++++tags%3A%0A++++++++++++-+%7B+name%3A+vrt.task_manager.task%2C+provider%3A+%25vrt_providers_%3C%3Csuffix%3E%3E.name%25+%7D%0A%7B%7Bendif%7D%7D'
   15     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%7B%7Bif+.%2B%3F%7D%7D%2Fs'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $5      
          6      > JMPZ                                                     $5, ->40
   17     7    >   FETCH_DIM_R                                      ~6      !1, 0
          8      > FE_RESET_R                                       $7      ~6, ->39
          9    > > FE_FETCH_R                                               $7, !2, ->39
   18    10    >   INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 5
         13        SEND_VAL                                                 -2
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !2, $8
   20    16        ASSIGN                                                   !3, <false>
   22    17        BEGIN_SILENCE                                    ~11     
         18        CONCAT                                           ~12     '%24res+%3D+%28', !2
         19        CONCAT                                           ~13     ~12, '%29%3B'
         20        INCLUDE_OR_EVAL                                          ~13, EVAL
         21        END_SILENCE                                              ~11
   24    22      > JMPZ                                                     !3, ->31
   25    23    >   INIT_FCALL                                               'preg_replace'
         24        SEND_VAL                                                 '%2F%7B%7B.%2B%3F%7D%7D%2F'
         25        SEND_VAL                                                 ''
         26        SEND_VAR                                                 !0
         27        SEND_VAL                                                 2
         28        DO_ICALL                                         $15     
         29        ASSIGN                                                   !0, $15
         30      > JMP                                                      ->38
   27    31    >   INIT_FCALL                                               'preg_replace'
         32        SEND_VAL                                                 '%2F%7B%7Bif.%2B%3Fendif%7D%7D%2Fs'
         33        SEND_VAL                                                 ''
         34        SEND_VAR                                                 !0
         35        SEND_VAL                                                 1
         36        DO_ICALL                                         $17     
         37        ASSIGN                                                   !0, $17
   17    38    > > JMP                                                      ->9
         39    >   FE_FREE                                                  $7
   32    40    >   ECHO                                                     !0
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.49 ms | 1400 KiB | 19 Q