3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = http_build_query( array( 'criteria' => sprintf('(customerId=="%d")', 6777777), 'text' => 'test', 'audio' => 'won', 'badge' => 123, ) ); //echo $t; $str ='OK=4:FAIL=0'; echo str_replace(':', '&', $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DetMV
function name:  (null)
number of ops:  20
compiled vars:  !0 = $t, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'http_build_query'
    5     1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 '%28customerId%3D%3D%22%25d%22%29'
          3        SEND_VAL                                                 6777777
          4        DO_ICALL                                         $2      
          5        INIT_ARRAY                                       ~3      $2, 'criteria'
    6     6        ADD_ARRAY_ELEMENT                                ~3      'test', 'text'
    7     7        ADD_ARRAY_ELEMENT                                ~3      'won', 'audio'
    8     8        ADD_ARRAY_ELEMENT                                ~3      123, 'badge'
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                         $4      
    3    11        ASSIGN                                                   !0, $4
   14    12        ASSIGN                                                   !1, 'OK%3D4%3AFAIL%3D0'
   15    13        INIT_FCALL                                               'str_replace'
         14        SEND_VAL                                                 '%3A'
         15        SEND_VAL                                                 '%26'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $7      
         18        ECHO                                                     $7
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.51 ms | 1395 KiB | 19 Q