3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ( !defined( 'JSON_PARTIAL_OUTPUT_ON_ERROR' ) ) { define( 'JSON_PARTIAL_OUTPUT_ON_ERROR', 0 ); } $a = array(); $a[0] = 'A'; $a[1] =& $a; $a[2] = 'B'; var_dump( json_encode( array( $a ), JSON_PARTIAL_OUTPUT_ON_ERROR ) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 5
Branch analysis from position: 1
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/9iX4P
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > JMPZ                                                     <false>, ->5
    4     1    >   INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'JSON_PARTIAL_OUTPUT_ON_ERROR'
          3        SEND_VAL                                                 0
          4        DO_ICALL                                                 
    7     5    >   ASSIGN                                                   !0, <array>
    8     6        ASSIGN_DIM                                               !0, 0
          7        OP_DATA                                                  'A'
    9     8        FETCH_DIM_W                                      $4      !0, 1
          9        ASSIGN_REF                                               $4, !0
   10    10        ASSIGN_DIM                                               !0, 2
         11        OP_DATA                                                  'B'
   12    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'json_encode'
         14        INIT_ARRAY                                       ~7      !0
         15        SEND_VAL                                                 ~7
         16        SEND_VAL                                                 512
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.59 ms | 1386 KiB | 19 Q