3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contents_request = "http://en.wikipedia.org/w/api.php?format=json&action=parse&page=Enter%20Sandman"; $contents_response = file_get_contents($contents_request); $contents_jsonobj = json_decode($contents_response); $key = key($contents_jsonobj->parse->text); $wikitext = $contents_jsonobj->parse->text->$key; $wiki_html = str_replace("<a href=\"/","<a target=\"_blank\" href=\"http://en.wikipedia.org/", $wikitext); $toc = strpos("toc", $wiki_html); echo $toc; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aLttn
function name:  (null)
number of ops:  32
compiled vars:  !0 = $contents_request, !1 = $contents_response, !2 = $contents_jsonobj, !3 = $key, !4 = $wikitext, !5 = $wiki_html, !6 = $toc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fen.wikipedia.org%2Fw%2Fapi.php%3Fformat%3Djson%26action%3Dparse%26page%3DEnter%2520Sandman'
    3     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $8      
          4        ASSIGN                                                   !1, $8
    4     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $10     
          8        ASSIGN                                                   !2, $10
    5     9        INIT_FCALL                                               'key'
         10        FETCH_OBJ_R                                      ~12     !2, 'parse'
         11        FETCH_OBJ_R                                      ~13     ~12, 'text'
         12        SEND_VAL                                                 ~13
         13        DO_ICALL                                         $14     
         14        ASSIGN                                                   !3, $14
    6    15        FETCH_OBJ_R                                      ~16     !2, 'parse'
         16        FETCH_OBJ_R                                      ~17     ~16, 'text'
         17        FETCH_OBJ_R                                      ~18     ~17, !3
         18        ASSIGN                                                   !4, ~18
    8    19        INIT_FCALL                                               'str_replace'
         20        SEND_VAL                                                 '%3Ca+href%3D%22%2F'
         21        SEND_VAL                                                 '%3Ca+target%3D%22_blank%22+href%3D%22http%3A%2F%2Fen.wikipedia.org%2F'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $20     
         24        ASSIGN                                                   !5, $20
   10    25        INIT_FCALL                                               'strpos'
         26        SEND_VAL                                                 'toc'
         27        SEND_VAR                                                 !5
         28        DO_ICALL                                         $22     
         29        ASSIGN                                                   !6, $22
   12    30        ECHO                                                     !6
   13    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.4 ms | 1396 KiB | 23 Q