3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = '[ { "id": "1087", "name": "Abhishek Saini", "email": "info@gmail.com", "gender": "male" }, { "id": "1088", "name": "Gourav", "email": "test@gmail.com", "gender": "male" } ]'; $json = json_decode($str, true); $json = array('users' => $json); echo json_encode($json, JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XVWZF
function name:  (null)
number of ops:  14
compiled vars:  !0 = $str, !1 = $json
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%5B%0A+++%7B%0A++++++%22id%22%3A+%221087%22%2C%0A++++++%22name%22%3A+%22Abhishek+Saini%22%2C%0A++++++%22email%22%3A+%22info%40gmail.com%22%2C%0A++++++%22gender%22%3A+%22male%22%0A+++%7D%2C%0A+++%7B%0A++++++%22id%22%3A+%221088%22%2C%0A++++++%22name%22%3A+%22Gourav%22%2C%0A++++++%22email%22%3A+%22test%40gmail.com%22%2C%0A++++++%22gender%22%3A+%22male%22%0A+++%7D%0A%5D'
   18     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                             $3      
          5        ASSIGN                                                       !1, $3
   19     6        INIT_ARRAY                                           ~5      !1, 'users'
          7        ASSIGN                                                       !1, ~5
   20     8        INIT_FCALL                                                   'json_encode'
          9        SEND_VAR                                                     !1
         10        SEND_VAL                                                     128
         11        DO_ICALL                                             $7      
         12        ECHO                                                         $7
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.99 ms | 2039 KiB | 15 Q