3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datasets = array( '', null, '{}', '"foo"', 'foo', ); foreach ($datasets as $data) { echo sprintf("data: %s\n", print_r( json_decode($data, true), true ) ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/JrPT3
function name:  (null)
number of ops:  19
compiled vars:  !0 = $datasets, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $3      !0, ->17
          2    > > FE_FETCH_R                                               $3, !1, ->17
   10     3    >   INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 'data%3A+%25s%0A'
   11     5        INIT_FCALL                                               'print_r'
   12     6        INIT_FCALL                                               'json_decode'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
   13    11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15        ECHO                                                     $6
    9    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $3
   17    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.87 ms | 1386 KiB | 19 Q