3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "[]"; if (is_string($data)) { $res = json_decode($data, true); if ($res == NULL) { $res = $data; } } echo $res;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 11
filename:       /in/N1A0V
function name:  (null)
number of ops:  13
compiled vars:  !0 = $data, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%5D'
    4     1        TYPE_CHECK                                   64          !0
          2      > JMPZ                                                     ~3, ->11
    5     3    >   INIT_FCALL                                               'json_decode'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
    6     8        IS_EQUAL                                                 !1, null
          9      > JMPZ                                                     ~6, ->11
    7    10    >   ASSIGN                                                   !1, !0
   10    11    >   ECHO                                                     !1
   11    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.07 ms | 1385 KiB | 15 Q