3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'query' => 'hi', 'suggestions' => array ( 0 => 'history', 1 => 'hilton', 2 => 'hilton hhonors', 3 => 'hillary clinton', 4 => 'hickory farms', 5 => 'hip2save', 6 => 'hitler', 7 => 'hipaa', ), ); echo json_encode($array, JSON_PRETTY_PRINT) . "\n"; $array = array_values($array); echo json_encode($array, JSON_PRETTY_PRINT) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q3Vfu
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 128
          4        DO_ICALL                                         $2      
          5        CONCAT                                           ~3      $2, '%0A'
          6        ECHO                                                     ~3
   20     7        INIT_FCALL                                               'array_values'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !0, $4
   21    11        INIT_FCALL                                               'json_encode'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 128
         14        DO_ICALL                                         $6      
         15        CONCAT                                           ~7      $6, '%0A'
         16        ECHO                                                     ~7
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.63 ms | 998 KiB | 15 Q