3v4l.org

run code in 500+ PHP versions simultaneously
<?php $content = ' Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s. [include=contact_form] // here should be contact_form.php included Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s [include=cat] // here should be cat.php included '; // match if (preg_match_all('#\[include=(?P<name>.*?)\]#', $content, $includes)) { // loop foreach($includes['name'] as $include) { // buffer ob_start(); //include($include.'.php'); // 😲 echo 'I was from '.$include.'.php'; $buffer = ob_get_clean(); // replace $content = str_replace('[include='.$include.']', $buffer, $content); } } echo $content;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 25
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 24
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 25
filename:       /in/qPqbI
function name:  (null)
number of ops:  27
compiled vars:  !0 = $content, !1 = $includes, !2 = $include, !3 = $buffer
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%0ALorem+Ipsum+is+simply+dummy+text+of+the+printing+and+typesetting+industry.%0ALorem+Ipsum+has+been+the+industrys+standard+dummy+text+ever+since+the+1500s.%0A%0A%5Binclude%3Dcontact_form%5D+%2F%2F+here+should+be+contact_form.php+included%0A%0ALorem+Ipsum+is+simply+dummy+text+of+the+printing+and+typesetting+industry.%0ALorem+Ipsum+has+been+the+industrys+standard+dummy+text+ever+since+the+1500s%0A%0A%5Binclude%3Dcat%5D+%2F%2F+here+should+be+cat.php+included%0A'
   15     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%23%5C%5Binclude%3D%28%3FP%3Cname%3E.%2A%3F%29%5C%5D%23'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                             $5      
          6      > JMPZ                                                         $5, ->25
   17     7    >   FETCH_DIM_R                                          ~6      !1, 'name'
          8      > FE_RESET_R                                           $7      ~6, ->24
          9    > > FE_FETCH_R                                                   $7, !2, ->24
   19    10    >   INIT_FCALL                                                   'ob_start'
         11        DO_ICALL                                                     
   21    12        CONCAT                                               ~9      'I+was+from+', !2
         13        CONCAT                                               ~10     ~9, '.php'
         14        ECHO                                                         ~10
   22    15        INIT_FCALL                                                   'ob_get_clean'
         16        DO_ICALL                                             $11     
         17        ASSIGN                                                       !3, $11
   25    18        CONCAT                                               ~13     '%5Binclude%3D', !2
         19        CONCAT                                               ~14     ~13, '%5D'
         20        FRAMELESS_ICALL_3                str_replace         ~15     ~14, !3
         21        OP_DATA                                                      !0
         22        ASSIGN                                                       !0, ~15
   17    23      > JMP                                                          ->9
         24    >   FE_FREE                                                      $7
   29    25    >   ECHO                                                         !0
   30    26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.2 ms | 2211 KiB | 16 Q