3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: application/json'); function returnJSON (string $string, bool $success) { exit(json_encode(['success' => $success, 'message' => $string])); //doesnt print anything } if (true) returnJSON("This message is not printed...", false);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/aNjha
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+application%2Fjson'
          2        DO_ICALL                                                 
    9     3      > JMPZ                                                     <true>, ->8
   10     4    >   INIT_FCALL                                               'returnjson'
          5        SEND_VAL                                                 'This+message+is+not+printed...'
          6        SEND_VAL                                                 <false>
          7        DO_FCALL                                      0          
          8    > > RETURN                                                   1

Function returnjson:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/aNjha
function name:  returnJSON
number of ops:  9
compiled vars:  !0 = $string, !1 = $success
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'json_encode'
          3        INIT_ARRAY                                       ~2      !1, 'success'
          4        ADD_ARRAY_ELEMENT                                ~2      !0, 'message'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7      > EXIT                                                     $3
    7     8*     > RETURN                                                   null

End of function returnjson

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.29 ms | 1397 KiB | 18 Q