3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = '{"aasd":0}'; $user_notif = [ 'requests' => '0', 'offers' => '0', 'price_contests' => '0', 'orders' => '0', 'users' => '0', ]; $user_notif = json_decode(json_encode($user_notif)); $user_notif->news = 'asdasd'; var_dump(is_object(json_decode($a))); var_dump(json_encode($user_notif)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9jgSi
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $user_notif
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%22aasd%22%3A0%7D'
    4     1        ASSIGN                                                   !1, <array>
   12     2        INIT_FCALL                                               'json_decode'
          3        INIT_FCALL                                               'json_encode'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   14     9        ASSIGN_OBJ                                               !1, 'news'
         10        OP_DATA                                                  'asdasd'
   16    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'json_decode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $8      
         15        TYPE_CHECK                                  256  ~9      $8
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                                 
   18    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'json_encode'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $11     
         22        SEND_VAR                                                 $11
         23        DO_ICALL                                                 
   20    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.75 ms | 1395 KiB | 19 Q