3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET = ['user' => 'Bob', 'location' => 'city']; $queryStr = http_build_query($_GET); echo $queryStr, PHP_EOL; $sth = str_replace ("user", "somethingelse",$queryStr); echo $sth, PHP_EOL; $sth = substr($queryStr, 0, 9); echo $sth, PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8i1sH
function name:  (null)
number of ops:  26
compiled vars:  !0 = $queryStr, !1 = $sth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $2      '_GET'
          1        ASSIGN                                                   $2, <array>
    4     2        INIT_FCALL                                               'http_build_query'
          3        FETCH_R                      global              ~4      '_GET'
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !0, $5
    5     7        ECHO                                                     !0
          8        ECHO                                                     '%0A'
    7     9        INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 'user'
         11        SEND_VAL                                                 'somethingelse'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !1, $7
    8    15        ECHO                                                     !1
         16        ECHO                                                     '%0A'
    9    17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 0
         20        SEND_VAL                                                 9
         21        DO_ICALL                                         $9      
         22        ASSIGN                                                   !1, $9
   10    23        ECHO                                                     !1
         24        ECHO                                                     '%0A'
   11    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.93 ms | 1001 KiB | 16 Q