3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parsed_url = parse_url($url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts|info&titles=**VARIABLE**&format=json&explaintext&redirects&inprop=url&indexpageids"); $params = []; parse_str($parsed_url['query'], $params); $title = 'Some example';// $data->query->pages->$pageid->title; $params['titles'] = $title; $parsed_url['query'] = http_build_query($params); $url = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $parsed_url['path']. '?' . $parsed_url['query']; echo $url;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TpJVI
function name:  (null)
number of ops:  31
compiled vars:  !0 = $parsed_url, !1 = $url, !2 = $params, !3 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'parse_url'
          1        ASSIGN                                           ~4      !1, 'http%3A%2F%2Fen.wikipedia.org%2Fw%2Fapi.php%3Faction%3Dquery%26prop%3Dextracts%7Cinfo%26titles%3D%2A%2AVARIABLE%2A%2A%26format%3Djson%26explaintext%26redirects%26inprop%3Durl%26indexpageids'
          2        SEND_VAL                                                 ~4
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !0, $5
    6     5        ASSIGN                                                   !2, <array>
    8     6        INIT_FCALL                                               'parse_str'
          7        FETCH_DIM_R                                      ~8      !0, 'query'
          8        SEND_VAL                                                 ~8
          9        SEND_REF                                                 !2
         10        DO_ICALL                                                 
   10    11        ASSIGN                                                   !3, 'Some+example'
   12    12        ASSIGN_DIM                                               !2, 'titles'
         13        OP_DATA                                                  !3
   14    14        INIT_FCALL                                               'http_build_query'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $13     
         17        ASSIGN_DIM                                               !0, 'query'
         18        OP_DATA                                                  $13
   16    19        FETCH_DIM_R                                      ~14     !0, 'scheme'
         20        CONCAT                                           ~15     ~14, '%3A%2F%2F'
         21        FETCH_DIM_R                                      ~16     !0, 'host'
         22        CONCAT                                           ~17     ~15, ~16
         23        FETCH_DIM_R                                      ~18     !0, 'path'
         24        CONCAT                                           ~19     ~17, ~18
         25        CONCAT                                           ~20     ~19, '%3F'
         26        FETCH_DIM_R                                      ~21     !0, 'query'
         27        CONCAT                                           ~22     ~20, ~21
         28        ASSIGN                                                   !1, ~22
   18    29        ECHO                                                     !1
   19    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.69 ms | 1462 KiB | 16 Q