3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = json_encode(array('testparam' => null)); $var = (array)json_decode($json); print 'null: ' . ( $var['testparam'] ? 1 : 0);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ju2MR
function name:  (null)
number of ops:  17
compiled vars:  !0 = $json, !1 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_encode'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    4     4        INIT_FCALL                                               'json_decode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        CAST                                          7  ~5      $4
          8        ASSIGN                                                   !1, ~5
    6     9        FETCH_DIM_R                                      ~7      !1, 'testparam'
         10      > JMPZ                                                     ~7, ->13
         11    >   QM_ASSIGN                                        ~8      1
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~8      0
         14    >   CONCAT                                           ~9      'null%3A+', ~8
         15        ECHO                                                     ~9
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.81 ms | 1395 KiB | 17 Q