3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "41.24.32.3 : - -"; list ($ip, $results) = explode(" : ", $input); $results = str_replace("-", "-1", $results); $results = explode(" ", $results); $o = json_encode(array("ip" => $ip, "results" => $results)); print("$o\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HQtW9
function name:  (null)
number of ops:  31
compiled vars:  !0 = $input, !1 = $ip, !2 = $results, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '41.24.32.3+%3A+-+-'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+%3A+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        FETCH_LIST_R                                     $6      $5, 0
          6        ASSIGN                                                   !1, $6
          7        FETCH_LIST_R                                     $8      $5, 1
          8        ASSIGN                                                   !2, $8
          9        FREE                                                     $5
    6    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 '-'
         12        SEND_VAL                                                 '-1'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !2, $10
    7    16        INIT_FCALL                                               'explode'
         17        SEND_VAL                                                 '+'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !2, $12
    9    21        INIT_FCALL                                               'json_encode'
         22        INIT_ARRAY                                       ~14     !1, 'ip'
         23        ADD_ARRAY_ELEMENT                                ~14     !2, 'results'
         24        SEND_VAL                                                 ~14
         25        DO_ICALL                                         $15     
         26        ASSIGN                                                   !3, $15
   11    27        NOP                                                      
         28        FAST_CONCAT                                      ~17     !3, '%0A'
         29        ECHO                                                     ~17
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.53 ms | 1395 KiB | 19 Q