3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$output = file_get_contents($turl); $output = "<head> blablabla Bla bla </head> <body> Foobar </body>"; //Decapitation $head = substr($output, 0, strpos($output, "<body>")); $body = substr($output, strpos($output, "<body>")); Echo $head; Echo $body; /* $newOutput = str_replace('href="http', 'target="_parent" href="hhttp://localhost/e/site.php?turl=http', $output); $newOutput = str_replace('href="www.', 'target="_parent" href="http://localhost/e/site.php?turl=www.', $newOutput); $newOutput = str_replace('href="/', 'target="_parent" href="http://localhost/e/site.php?turl='.$turl.'/', $newOutput); echo $newOutput;*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WYcYP
function name:  (null)
number of ops:  23
compiled vars:  !0 = $output, !1 = $head, !2 = $body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%3Chead%3E+blablabla%0A%0ABla+bla%0A%3C%2Fhead%3E%0A%3Cbody%3E%0AFoobar%0A%3C%2Fbody%3E'
   14     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '%3Cbody%3E'
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
   15    11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !0
         13        INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 '%3Cbody%3E'
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                         $8      
         19        ASSIGN                                                   !2, $8
   17    20        ECHO                                                     !1
   18    21        ECHO                                                     !2
   24    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.77 ms | 1399 KiB | 17 Q