3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "{\"price\":\"70.00\"}"; $obj = json_decode($str); $x = $obj['price'] ?? 'ribbit'; var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gZohV
function name:  (null)
number of ops:  13
compiled vars:  !0 = $str, !1 = $obj, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%7B%22price%22%3A%2270.00%22%7D'
    5     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        FETCH_DIM_IS                                     ~6      !1, 'price'
          6        COALESCE                                         ~7      ~6
          7        QM_ASSIGN                                        ~7      'ribbit'
          8        ASSIGN                                                   !2, ~7
    7     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.4 ms | 1385 KiB | 17 Q