3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://somedomain.com/somesite/'; $content = file_get_contents($url); $first_step = explode( '<div id="thediv">' , $content ); $second_step = explode("</div>" , $first_step[1] ); echo $second_step[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ULK6f
function name:  (null)
number of ops:  19
compiled vars:  !0 = $url, !1 = $content, !2 = $first_step, !3 = $second_step
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fsomedomain.com%2Fsomesite%2F'
    4     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    5     5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '%3Cdiv+id%3D%22thediv%22%3E'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    6    10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '%3C%2Fdiv%3E'
         12        FETCH_DIM_R                                      ~9      !2, 1
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !3, $10
    8    16        FETCH_DIM_R                                      ~12     !3, 0
         17        ECHO                                                     ~12
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
238.96 ms | 1395 KiB | 17 Q