3v4l.org

run code in 300+ 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 = 28
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 27
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 27
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 28
filename:       /in/qPqbI
function name:  (null)
number of ops:  30
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, ->28
   17     7    >   FETCH_DIM_R                                      ~6      !1, 'name'
          8      > FE_RESET_R                                       $7      ~6, ->27
          9    > > FE_FETCH_R                                               $7, !2, ->27
   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        INIT_FCALL                                               'str_replace'
         19        CONCAT                                           ~13     '%5Binclude%3D', !2
         20        CONCAT                                           ~14     ~13, '%5D'
         21        SEND_VAL                                                 ~14
         22        SEND_VAR                                                 !3
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $15     
         25        ASSIGN                                                   !0, $15
   17    26      > JMP                                                      ->9
         27    >   FE_FREE                                                  $7
   29    28    >   ECHO                                                     !0
   30    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.42 ms | 1396 KiB | 21 Q