3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create an element // Some dummy data $requestid = "requestid"; $service = "service"; $date = "today"; $data =[ "Id" => $requestid, "Service" => $service, "Date" => $date ]; // Create a parent array $json = []; // Add the element to the array twice $json[] = $data; $json[] = $data; 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/FlPuc
function name:  (null)
number of ops:  18
compiled vars:  !0 = $requestid, !1 = $service, !2 = $date, !3 = $data, !4 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'requestid'
    6     1        ASSIGN                                                   !1, 'service'
    7     2        ASSIGN                                                   !2, 'today'
   10     3        INIT_ARRAY                                       ~8      !0, 'Id'
   11     4        ADD_ARRAY_ELEMENT                                ~8      !1, 'Service'
   12     5        ADD_ARRAY_ELEMENT                                ~8      !2, 'Date'
    9     6        ASSIGN                                                   !3, ~8
   16     7        ASSIGN                                                   !4, <array>
   18     8        ASSIGN_DIM                                               !4
          9        OP_DATA                                                  !3
   19    10        ASSIGN_DIM                                               !4
         11        OP_DATA                                                  !3
   21    12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !4
         14        SEND_VAL                                                 128
         15        DO_ICALL                                         $13     
         16        ECHO                                                     $13
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.69 ms | 1009 KiB | 14 Q