3v4l.org

run code in 300+ PHP versions simultaneously
<?php function return_json($obj) { ob_start(); header("Content-Type: application/json"); echo json_encode($obj); ob_end_flush(); exit; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FhU7j
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   1

Function return_json:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/FhU7j
function name:  return_json
number of ops:  14
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'ob_start'
          2        DO_ICALL                                                 
    5     3        INIT_FCALL                                               'header'
          4        SEND_VAL                                                 'Content-Type%3A+application%2Fjson'
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        ECHO                                                     $3
    7    10        INIT_FCALL                                               'ob_end_flush'
         11        DO_ICALL                                                 
    8    12      > EXIT                                                     
    9    13*     > RETURN                                                   null

End of function return_json

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.64 ms | 1394 KiB | 21 Q