3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dbData = array(); array_unshift($dbData, array("4", "David", "Somebody")); array_unshift($dbData, array("3", "Carl", "Somebody")); array_unshift($dbData, array("2", "Bert", "Somebody")); array_unshift($dbData, array("1", "David", "Somebody")); $data['data'] = $dbData; header('Content-Type: application/json; charset=utf-8'); print json_encode($data); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2oOoq
function name:  (null)
number of ops:  27
compiled vars:  !0 = $dbData, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_unshift'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                                 
    4     5        INIT_FCALL                                               'array_unshift'
          6        SEND_REF                                                 !0
          7        SEND_VAL                                                 <array>
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'array_unshift'
         10        SEND_REF                                                 !0
         11        SEND_VAL                                                 <array>
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'array_unshift'
         14        SEND_REF                                                 !0
         15        SEND_VAL                                                 <array>
         16        DO_ICALL                                                 
    7    17        ASSIGN_DIM                                               !1, 'data'
         18        OP_DATA                                                  !0
    8    19        INIT_FCALL                                               'header'
         20        SEND_VAL                                                 'Content-Type%3A+application%2Fjson%3B+charset%3Dutf-8'
         21        DO_ICALL                                                 
    9    22        INIT_FCALL                                               'json_encode'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $9      
         25        ECHO                                                     $9
   10    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.33 ms | 1395 KiB | 19 Q